lkml.org 
[lkml]   [2007]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] cpusets: add interleave_over_allowed option
On Mon, 29 Oct 2007, Paul Jackson wrote:

> > Policies such as MPOL_INTERLEAVE always get AND'd with
> > pol->cpuset_mems_allowed.
>
> Not AND'd - Folded, as in bitmap_remap().
>
> > If that yields numa_no_nodes, MPOL_DEFAULT is used instead.
>
> Not an issue with Folding.
>
> > Policies such as MPOL_PREFERRED are respected if the node
> > is set in pol->cpuset_mems_allowed, otherwise MPOL_DEFAULT
> > is used.
>
> Not an issue with Folding.
>
> > If an application attempts to setup a memory policy for
> > an MPOL_PREFERRED node that it doesn't have access to or
> > an MPOL_INTERLEAVE nodemask that is empty when AND'd with
> > pol->cpuset_mems_allowed, -EINVAL is returned and no new
> > policy is effected.
>
> Not issues with Folding.
>
> > If an application gains nodes in pol->cpuset_mems_allowed that
> > now include the nodes from MPOL_INTERLEAVE or MPOL_PREFERRED,
> > that policy is then effected once again. Otherwise,
> > MPOL_DEFAULT is still used.
>
> Not issues with Folding.
>
> With folding, an application that layed out an elaborate memory
> policy configuration covering say 16 nodes can run in a 4 node
> cpuset, where whatever would have been on node N gets folded down
> to node N % 4.
>

Missing the point; this is an alternative to the previous choices; Choice
C explicitly removes all remaps ("folding") from mempolicies. The
nodemask passed to set_mempolicy() will always have exactly one meaning:
the system nodes that the policy is intended for.

Cpusets, which are built upon mempolicies, can obviously take access to
some of those nodes away. That's why the existing mempolicies are AND'd
with the cpuset's mems_allowed to represent the current nodemask that the
mempolicy is effecting. If none of them are available because of cpusets,
the mempolicy is invalidated and MPOL_DEFAULT is used. If access to some
nodes from the mempolicy's nodemask become available once again, the
policy is again effected.

I'm arguing that remapping a policy's nodemask, although that is what
currently is done, is troublesome because it can use a policy such as
MPOL_PREFERRED to work on a node for which it was never intended.

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

\
 
 \ /
  Last update: 2007-10-30 23:57    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site