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

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


On Thu, 14 Feb 2008, Paul Jackson wrote:

> If we ever call mpol_rebind_policy() with an MPOL_PREFERRED|MPOL_F_STATIC_NODES
> policy when the preferred_node doesn't happen to be in the current cpuset,
> then would the following lines loose the preferred node setting, such that
> it didn't get applied again correctly if that node came back into our allowed
> cpuset ?
>
> case MPOL_PREFERRED:
> if (!remap && !node_isset(pol->v.preferred_node, *newmask))
> pol->v.preferred_node = -1;
>

That's already been corrected as a result of a discussion between Lee and
myself (please see the incremental patch that I sent you privately when I
sent the patchset along).

> Should the mpol_equal() algorithm change, in the case of either
> MPOL_F_RELATIVE_NODES or MPOL_F_STATIC_NODES, to checking
> user_nodemask equality, -instead- of the "switch(mode)"
> mode specific tests?
>

That's a good question.

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 didn't originally modify mpol_equal() because I preferred the former.
Is there a compelling case for the latter where mpol_equal() is used in
the tree that would require this change?

> 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'.

David
--
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/