All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: Fwd: Patch for using /proc/<id>oom_score_adj with newer kernels
Date: Mon, 9 May 2011 11:18:49 -0400	[thread overview]
Message-ID: <201105091118.49654.sgrubb@redhat.com> (raw)
In-Reply-To: <20110502230831.GA6875@suse.de>

On Monday, May 02, 2011 07:08:31 PM Tony Jones wrote:
> I'm not sure what the policy is on moderator approval for posts.  AJ sent
> this a while ago and resent again on 4/27 (he is not subscribed, so both
> times the post was waiting moderator approval). 

Anyone can CC me on a patch to make sure its gets through.


> Anyways, we've had this patch in our OpenSuSE version for a while.

Applied but with a change.


> +	/* Newer kernels (noticed in 2.6.36) */
> +	oomfd =	open("/proc/self/oom_score_adj", O_NOFOLLOW | O_WRONLY);
> +        if (oomfd >= 0) {
> +                (void)write(oomfd, "0", 1);

This needs to be -1000 to have the same behavior as before.

-Steve

      reply	other threads:[~2011-05-09 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02 23:08 Fwd: Patch for using /proc/<id>oom_score_adj with newer kernels Tony Jones
2011-05-09 15:18 ` Steve Grubb [this message]

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201105091118.49654.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.