Michal Hocko <mhocko@xxxxxxxx> writes: > On Wed 13-10-21 18:53:55, Aneesh Kumar K.V wrote: >> On 10/13/21 18:46, Andi Kleen wrote: >> > >> > > The difference with MPOL_BIND is the ability to specify a preferred node >> > > which is the first node in the nodemask argument passed. >> > >> > That's always the one with the lowest number. Isn't that quite limiting >> > in practice? >> > >> > It seems if you really want to do that you would need another argument. >> > >> Yes. But that would make it a new syscall. Should we do that? > > Yes, I do not see any reasonable to cram this into the existing syscall. > I am not yet sure what the syscall should look like though. I can see > two usecases, one of the is a very specific node allocation fallback > order requirement and another one is preferrence for a cpu less node > over other nodes. Both are slightly different. How about SYSCALL_DEFINE5(preferred_mbind, unsigned long, start, unsigned long, len, unsigned long, preferred_node, const unsigned long __user *, nmask, unsigned long, maxnode) { return kernel_mbind(start, len, MPOL_PREFERRED_STRICT, preferred_node, nmask, maxnode, 0); }