Re: [ckrm-tech] Re: [Lse-tech] [PATCH] cpusets - big numa cpu and memory placement

Matthew Helsley
2004-10-07T21:21:18Z

On Thu, 2004-10-07 at 12:52, Paul Jackson wrote:
<snip>
> Also the other means to poke the affinity masks, sched_setaffinity,
> mbind and set_mempolicy, need to be constrained to respect cpuset
> boundaries and honor exclusion. I doubt you want them calling out to a
> user daemon either.
>
> And the memory affinity mask, mems_allowed, seems to require updating
> within the current task context. Perhaps someone else is smart enough
> to see an alternative, but I could not find a safe way to update this
> from outside the current context. So it's updated on the path going
> into __alloc_pages(). I doubt you want a patch that calls out to my
> daemon on each call into __alloc_pages().
<snip>

Just a thought: could a system-wide ld preload of some form be useful
here? You could use preload to add wrappers around the necessary calls
(you'd probably want to do this in /etc/ld.so.preload). Then have those
wrappers communicate with a daemon or open some /etc config files that
describe the topology you wish to enforce.

Cheers,
-Matt Helsley