pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date: Mon, 19 Sep 2011 11:25:54 +0300
Message-ID: <1316420754.14001.3.camel@fsopti579.F-Secure.com> (raw)
In-Reply-To: <15953.1316362868@sss.pgh.pa.us>
References: <29121.1316185073@sss.pgh.pa.us>
	<1316355543.12186.9.camel@vanquo.pezone.net>
	<15953.1316362868@sss.pgh.pa.us>

On sön, 2011-09-18 at 12:21 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > On fre, 2011-09-16 at 10:57 -0400, Tom Lane wrote:
> >> 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.
> 
> > There are lots of reasons why that won't work: backports, forward ports,
> > derivatives, custom kernels, distribution upgrades, virtual hosting.
> 
> [ shrug... ]  These are all hypothetical reasons.  A packager who
> foresaw needing that could just turn on both write attempts, or for that
> matter patch the code to do whatever else he saw fit.  In practice,
> we've not had requests for anything significantly smarter than what is
> there.
> 
> But having said that, it wouldn't be very hard to arrange things so that
> if you did have both symbols defined, the code would only attempt to
> write oom_adj if it had failed to write oom_score_adj; which is about as
> close as you're likely to get to a kernel version test for this.

Why is this feature not a run-time configuration variable or at least a
configure option?  It's awfully well hidden now.  I doubt a lot of
people are using this even though they might wish to.




view thread (66+ messages)  latest in thread

Message-ID: <1316420754.14001.3.camel@fsopti579.F-Secure.com>
Permalink:  ../1316420754.14001.3.camel@fsopti579.F-Secure.com/
Also on:    postgresql.org/message-id/1316420754.14001.3.camel@fsopti579.F-Secure.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter_e@gmx.net, tgl@sss.pgh.pa.us
  Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
  In-Reply-To: <1316420754.14001.3.camel@fsopti579.F-Secure.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox