In response (albeit a week plus late) to the recent hubbub about the cpu affinity patches, I'd like to throw a third contender in the ring. Attatched is a patch (against 2.4.16) which implements a /proc and a prctl() interface to the cpus_allowed flag. The truly exciting (at least for me) part of this patch is the launch_policy flag that it also introduces. The launch_policy flag is used similarly to the cpus_allowed flag, but it controls the cpus_allowed flags of any subsequent children of the process, instead of the cpus_allowed of the process itself. Via this flag, there are no worries about processes being able to fork children before a 'chaff' or 'echo' or anything else for that matter can be executed. The child process is assigned the desired cpus_allowed at fork/exec time. All this without having to bounce the current process to different cpus to (hopefully) acheive the same results. The launch_policy flag can acually be quite powerful. It allows for children to be instantiated on the correct cpu/node with a minimum of memory footprint on the wrong cpu/node. This can be taken advantage of via the /proc interface (for smp/numa unaware programs) or through prctl() for more clueful programs. You must have CAP_SYS_NICE or be the owner of the process to change *either* cpus_allowed or launch_policy. I will momentarily be posting this patch in its own thread for greater exposure. Feedback of any kind will be greatly appreciated! Enjoy! -matt