On Tue, 2008-02-26 at 17:17 -0800, David Rientjes wrote:
Nice work. Would you consider adding this [with the corrections you
note below] to the memory policy doc under the "interaction with
cpusets" section?
Just a note here: If you had used the same set of "rebind targets" for
_BIND as you did for _INTERLEAVE, I would expect the same results,
because were just remapping bit masks in both cases. Do you agree?
Thoughts:
1) this IS a change in behavior, right? My first inclination is to shy
away from this. However, ...
2) the current interaction of mempolicies with cpusets is not well
documented--until Paul's cpuset.4 man page hits the streets, anyway.
That doc does say that mempolicy is not allowed to use a node outside
the cpuset. It does NOT say how this is enforced--reject vs masking vs
remap. The set_mempolicy(2) and mbind(2) man pages [in at least 2.70
man pages] says that you get EINVAL if you specify a node outside the
current cpuset constraints. This was relaxed by the recent patch to
"silently restrict" the nodes to mems allowed.
Since we update the man pages anyway, we COULD change it to say that we
remap policy to allowed nodes. However, the application may have chosen
the nodes based on some knowledge of hardware topology, such as IO
attachement, interrupt handling cpus, ... In this case, remapping
doesn't make so much sense to me.
If you need/want a mode that remaps policy to mems allowed on
installation--e.g., to provide the maximum number of interleave
nodes--how about yet another flag, such as '_REMAP, to effect this
behavior?
Just a thought...
'nil' falls back to local allocation, right?
Here, '-1' means 'local allocation'. [Note for documentation...]
--