Re: /proc/self/oom_adj is deprecated in newer Linux kernels

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Дата
Msg-id 20654.1404247905@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Christoph Berg <cb@df7cb.de>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jul 1, 2014 at 8:22 AM, Christoph Berg <cb@df7cb.de> wrote:
>> I have two comments on the patch:
>> 
>> The choice to make the behavior depend first on PG_OOM_ADJUST_FILE and
>> only secondly on PG_OOM_ADJUST_VALUE seems the wrong way round to me.

> Of course, we have no guarantee that the Linux kernel guys won't
> change this again.  Apparently "we don't break userspace" is a
> somewhat selectively-enforced principle.

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.

>> The other bit is the non-deprecation of OOM_ADJ in
>> contrib/start-scripts/linux. It took me a while to understand the
>> logic of the variables used there - the interface would be much
>> clearer if it just was like this:
>> ... and then use PG_OOM_ADJUST_FILE below instead of manually figuring
>> out which proc file to write to by looking at OOM.*_ADJ.

> I can't help but agree with this, though.

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.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: change alter user to be a true alias for alter role
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Spinlocks and compiler/memory barriers