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