Re: /proc/self/oom_adj is deprecated in newer Linux kernels - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date
Msg-id 20140702091739.GC3645@msg.df7cb.de
Whole thread Raw
In response to Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Re: Tom Lane 2014-07-01 <20654.1404247905@sss.pgh.pa.us>
> Yeah, I'm unexcited about this proposal.  In any case, given the two
> existing APIs we have to deal with, allowing PG_OOM_ADJUST_VALUE to
> default to "0" is sane in both APIs but a default for the file name
> can work for only one.

Nod.

> Fair enough.  I went for a minimum-change approach when hacking that
> script, but we could change it some more in the name of readability.
> Will do something about that.

Thanks, it's much nicer now. There's one uglyness left though: The
name PG_CHILD_OOM_SCORE_ADJ should match what actually gets passed to
the backends,

DAEMON_ENV="PG_OOM_ADJUST_FILE=$PG_OOM_ADJUST_FILE PG_OOM_ADJUST_VALUE=$PG_CHILD_OOM_SCORE_ADJ"

would better be PG_OOM_ADJUST_VALUE=$PG_OOM_ADJUST_VALUE.

(Possibly the smart way to fix this would be to change
src/backend/postmaster/fork_process.c to use PG_CHILD_OOM_SCORE_ADJ
instead.)

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/



pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: 9.5 CF1
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: 9.5 CF1