mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurt Garloff <garloff@suse.de>
To: Carlos Martin <carlos@cmartin.tk>
Cc: Linux kernel list <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@redhat.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] OOM: initialise points variable in out_of_memory()
Date: Tue, 28 Feb 2006 13:13:03 +0100	[thread overview]
Message-ID: <20060228121303.GE6641@tpkurt.garloff.de> (raw)
In-Reply-To: <11410761851547-git-send-email-carlos@cmartin.tk>

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Hi Carlos,

On Mon, Feb 27, 2006 at 10:36:25PM +0100, Carlos Martin wrote:
> We didn't initialise points, so the value reported was completely
> random. This doesn't affect the behaviour of the funcion.

Did you observe it?

In the original patch, there is 
+static struct task_struct * select_bad_process(unsigned long *ppoints)
 {
-       unsigned long maxpoints = 0;
        struct task_struct *g, *p;
        struct task_struct *chosen = NULL;
        struct timespec uptime;
+       *ppoints = 0;

And this is called from out_of_memory().

But the constrained_alloc stuff seems to use points before 
select_bad_process() is called, so initializing to 0 is a
good idea. I don't remember having see the constrained_alloc
stuff, though, so I either did not look carefully enough or a 
merge error happened afterwards. 

Thanks for noticing and thanks for sending the fix!

Best,
-- 
Kurt Garloff, Head Architect Linux, Novell Inc.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

       reply	other threads:[~2006-02-28 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11410761851547-git-send-email-carlos@cmartin.tk>
2006-02-28 12:13 ` Kurt Garloff [this message]
2006-02-28 15:05   ` Carlos Martín

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=20060228121303.GE6641@tpkurt.garloff.de \
    --to=garloff@suse.de \
    --cc=akpm@osdl.org \
    --cc=carlos@cmartin.tk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®