Re: [patch 3/4] mempolicy: add MPOL_F_STATIC_NODES flag

From: David Rientjes
Date: Thu Feb 14 2008 - 20:44:49 EST


On Thu, 14 Feb 2008, David Rientjes wrote:

> We'll need to decide whether mpol_equal() is determining the equality of
> the currently effected mempolicy (whereas policy->user_nodemask is
> irrelevant) or the whole intended mempolicy overall.
>

I've done the latter in the latest patchset.

Since mpol_equal() is only used for determining whether nearby vmas can be
merged, it is only logical to merge them if they share the mempolicy
intent of the user if MPOL_F_STATIC_NODES or any flag that makes sense of
policy->user_nodemask is used.

> > Could we have mpol_to_str() mark policies which are
> > MPOL_F_RELATIVE_NODES or MPOL_F_STATIC_NODES? Perhaps
> > by adding a suffix of "|relative" or "|static" or some
> > such.
> >
>
> I'd like to keep it in the same format as the tmpfs mount option which is
> '=relative' and '=static'.
>

In preparation for mode flags in addition to MPOL_F_STATIC_NODES to be
added (like MPOL_F_RELATIVE_NODES or whatever Paul decides to call it
based on the latest feedback, I've prepared mpol_to_str() to have this
format

interleave=static|relative=1-3

as viewable from /proc/pid/numa_maps. This is also how tmpfs mount
options will be specified.

[ Of course the above example can't happen since MPOL_F_STATIC_NODES and
MPOL_F_RELATIVE_NODES are disjoint, but it's sufficient for the
example. ]
--
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/