linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Ken Chen" <kenchen@google.com>
To: Paul Jackson <pj@sgi.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org, clameter@sgi.com
Subject: Re: [patch] check cpuset mems_allowed for sys_mbind
Date: Wed, 9 May 2007 17:47:53 -0700	[thread overview]
Message-ID: <b040c32a0705091747x75f45eacwbe11fe106be71833@mail.gmail.com> (raw)
In-Reply-To: <20070509164859.15dd347b.pj@sgi.com>

On 5/9/07, Paul Jackson <pj@sgi.com> wrote:
> Ken wrote:
> > I wonder why we don't check cpuset's mems_allowed node mask in the
> > sys_mbind() path?
>
> Looking back through the version history of mm/mempolicy.c, I see that
> we used to check the cpuset (by calling contextualize_policy), but then
> with the following patch (Christoph added to CC list above), this was
> changed.

oh, boy, never ending circle of fixing a bug by introduce another one.
 No wonder why number of kernel bugs never goes down because everyone
is running in circles.

I see Christoph's point that when two threads live in two disjoint
cpusets, they can affect each other's memory policy and cause
undesired oom behavior.

However, mbind shouldn't create discrepancy between what is allowed
and what is promised, especially with MPOL_BIND policy.  Since a
numa-aware app has already gone such a detail to request memory
placement on a specific nodemask, they fully expect memory to be
placed there for performance reason.  If kernel lies about it, we get
very unpleasant performance issue.

I suppose neither behavior is correct nor desired.  What if we "OR"
all the nodemask for all threads in a process group and use that
nodemask to check against what is being requested, is that reasonable?

- Ken

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-05-10  0:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09 23:11 Ken Chen
2007-05-09 23:48 ` Paul Jackson
2007-05-10  0:47   ` Ken Chen [this message]
2007-05-10  0:55     ` Christoph Lameter
2007-05-10  1:26       ` Ken Chen
2007-05-10  1:44         ` Christoph Lameter
2007-05-10 18:32       ` Ken Chen
2007-05-10 18:41         ` Christoph Lameter
2007-05-10 19:30           ` Ken Chen

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=b040c32a0705091747x75f45eacwbe11fe106be71833@mail.gmail.com \
    --to=kenchen@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=pj@sgi.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