LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Paul Jackson <pj@sgi.com>,
	akpm@linux-foundation.org, Lee.Schermerhorn@hp.com, ak@suse.de,
	linux-kernel@vger.kernel.org
Subject: Re: [patch -mm 2/2] mempolicy: use default_policy mode instead of MPOL_DEFAULT
Date: Fri, 7 Mar 2008 18:14:56 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.1.00.0803071809010.13800@chino.kir.corp.google.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0803071754250.12037@schroedinger.engr.sgi.com>

On Fri, 7 Mar 2008, Christoph Lameter wrote:

> And where is the patch to set the system (or cpuset....) default policy? 
> ;-)
> 

The system default policy is inherently defined in get_vma_policy() and 
alloc_pages_current().

> Note that the system default policy changes during bootup. Could that be 
> done with the default policy? We had some issues a while back with 
> processes spawned at boot inheriting the interleave policy. If they could 
> refer to default_policy instead then a change of default_policy would 
> switch all spawned processes to use MPOL_DEFAULT?
> 

With the patch, get_vma_policy() would return the VMA's policy if it has 
its own get_policy() function that returns a valid policy or differs from 
the default, otherwise it would refer to whatever default_policy is 
statically allocated to represent.

For task mempolicies, alloc_pages_current() has always used default_policy 
if current->mempolicy is NULL.  So you can change default_policy.policy to 
be anything you want (and its v.nodes or v.preferred_node members) and 
that will be the effected policy for any task that doesn't have a valid 
->mempolicy.

  reply	other threads:[~2008-03-08  2:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08  1:24 [patch -mm 1/2] mempolicy: disallow static or relative flags for local preferred mode David Rientjes
2008-03-08  1:24 ` [patch -mm 2/2] mempolicy: use default_policy mode instead of MPOL_DEFAULT David Rientjes
2008-03-08  1:28   ` Paul Jackson
2008-03-08  1:33     ` David Rientjes
2008-03-08  1:35       ` Paul Jackson
2008-03-08  1:59         ` Christoph Lameter
2008-03-08  2:14           ` David Rientjes [this message]
2008-03-08 19:13       ` Lee Schermerhorn
2008-03-08 22:20         ` David Rientjes
2008-03-08 23:19           ` Andi Kleen
2008-03-10 13:48             ` Lee Schermerhorn
2008-03-10 19:09 ` [patch -mm 1/2] mempolicy: disallow static or relative flags for local preferred mode Andrew Morton

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=alpine.DEB.1.00.0803071809010.13800@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --subject='Re: [patch -mm 2/2] mempolicy: use default_policy mode instead of MPOL_DEFAULT' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).