From: Matthew D. <col...@us...> - 2003-04-01 22:48:42
|
Okee dokee... Here's the real core of the patch. This adds a struct binding (basically, just a zonelist). It adds a pointer to a binding into the struct address_space. Then it adds sys_membind() syscall to allow user-processes to bind memory. For now, the membind call only works if the region specified (start_addr, len) is a shared memory segment. It is an easy first case, and I think it's one of the more useful types of memory to try to bind. A binding call takes a cpumask in, translates it to a nodemask, and then ensures that all memory faulted into the region comes from memory on the nodes in the nodemask. Policy argument is ignored for now. Simple bindings only. Pretty much all the code is hidden behind #ifdef CONFIG_NUMA. This has virtually no effect on non-NUMA kernels. The patch also is not 100% done. It does some quirky things if you exhaust a node's memory. I need to look more into the interactions of this patch and OOM code. I would like comments from anyone interested in this patch. [mcd@arrakis membind]$ diffstat 01-membind.patch arch/i386/kernel/entry.S | 1 fs/inode.c | 1 include/asm-i386/unistd.h | 3 include/linux/binding.h | 37 ++++++++ include/linux/fs.h | 2 include/linux/pagemap.h | 26 ++++++ mm/Makefile | 2 mm/binding.c | 199 ++++++++++++++++++++++++++++++++++++++++++++++ mm/swap_state.c | 1 9 files changed, 270 insertions(+), 2 deletions(-) -Matt |