Re: [patch -mm 2/2] mempolicy: use default_policy mode instead ofMPOL_DEFAULT

From: David Rientjes
Date: Fri Mar 07 2008 - 21:15:24 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/