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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: /proc/self/oom_adj is deprecated in newer Linux kernels
Date: 2011-09-16 14:57:53
Message-ID: 29121.1316185073@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While testing 9.1 RPMs on Fedora 15 (2.6.40 kernel), I notice
messages like these in the kernel log:

Sep 11 13:38:56 rhl kernel: [ 415.308092] postgres (18040): /proc/18040/oom_adj is deprecated, please use /proc/18040/oom_score_adj instead.

These don't show up on every single PG process launch, but that probably
just indicates there's a rate-limiter in the kernel reporting mechanism.

So it looks like it behooves us to cater for oom_score_adj in the
future. The simplest, least risky change that I can think of is to
copy-and-paste the relevant #ifdef code block in fork_process.c.
If we do that, then it would be up to the packager whether to #define
LINUX_OOM_ADJ or LINUX_OOM_SCORE_ADJ or both depending on the behavior
he wants.

That would be good enough for my own purposes in building Fedora/RHEL
packages, since I can predict with confidence which kernel versions a
given build is likely to be used with. I think probably the same
would be true for most other distro-specific builds. Does anyone want
to argue for doing something more complicated, and if so what exactly?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2011-09-16 15:13:38 Re: Is there really no interest in SQL Standard?
Previous Message Susanne Ebrecht 2011-09-16 14:49:25 Re: Is there really no interest in SQL Standard?