Add support for Linux memory policy
Enable setting a NUMA memory policy for the container. New linux.mempolicy object contains inputs to the set_mempolicy(2) syscall.
Small nit, I'd suggest to use MemoryPolicy and memoryPolicy instead of mempolicy. It would be more readable IMHO.
LGTM after the changes suggested above
Small nit, I'd suggest to use
MemoryPolicyandmemoryPolicyinstead ofmempolicy. It would be more readable IMHO.
Thanks @kad, fixed. Definitely better.
It seems set_mempolicy(2) is only effective agains for called threads.
I'm not sure but we may need to implement it in nsexec.c of runc because of the thread limitation. I recommend to implement PoC in runc.
It seems set_mempolicy(2) is only effective agains for called threads. I'm not sure how to do it for processes created with exec. Any ideas?
the man page says:
The process memory policy is preserved across an [execve](https://linux.die.net/man/2/execve)(2), and is inherited by child processes created using [fork](https://linux.die.net/man/2/fork)(2) or [clone](https://linux.die.net/man/2/clone)(2).
so I don't think it is a problem for the spec
@giuseppe Oh, I missed it. Looks good.