NUMA API for 2.5.12 (4/4)
PATCH 1/1 NUMA API for 2.5.12 (4/4)
Ok all,
I'm going to go ahead and assume (hope) that the no response on the last
posting was because the patch was really large. We'll try this again with 4 smaller patches and see what happens.
This patch implements the NUMA API specified at:
http://lse.sourceforge.net/numa/numa_api.html for the 2.5.12 version of the kernel. The API implements such features as binding processes to CPUs (similar to Robert Love's recent patch), binding to memory blocks, setting launch policies for processes, and rudimentary topology features. The patch is currently used via a prctl() interface with a possible /proc interface in the future. I also have a syscall version if that is preferred.
Again, this is a slightly cleaned-up, and (more) bite-sized version of the
previous patch sent out...
Enjoy, and please send me any comments on the patch, or the API it implements!
-Matt
[email protected]
include/linux/prctl.h +27 -0
@@ -26,4 +26,31 @@# define PR_FPEMU_NOPRINT 1/* silently emulate fp operations accesses */ # define PR_FPEMU_SIGFPE 2/* don't emulate fp operations, send SIGFPE instead */ +/* Get/Set Restricted CPUs and MemBlks */ +#define PR_SET_RESTRICTED_CPUS 11 +#define PR_SET_RESTRICTED_MEMBLKS 12 +#define PR_GET_RESTRICTED_CPUS 13 +#define PR_GET_RESTRICTED_MEMBLKS 14 + +/* Get CPU/Node */ +#define PR_GET_CPU 15 +#define PR_GET_NODE 16 + +/* X to Node conversion functions */ +#define PR_CPU_TO_NODE 17 +#define PR_MEMBLK_TO_NODE 18 +#define PR_NODE_TO_NODE 19 + +/* Node to X conversion functions */ +#define PR_NODE_TO_CPU 20 +#define PR_NODE_TO_MEMBLK 21 + +/* Set CPU/MemBlk/Memory Bindings */ +#define PR_BIND_TO_CPUS 22 +#define PR_BIND_TO_MEMBLKS 23 +#define PR_BIND_MEMORY 24 + +/* Set Launch Policy */ +#define PR_SET_LAUNCH_POLICY 25 +#endif /* _LINUX_PRCTL_H */
kernel/sys.c +46 -0
58 lines not on this page · raw message