I'm currently working with an AMD Opteron-based NUMA system. For the needs of my current project, I'd like to make Linux and all of the system processes to utilize only the CPU0 (and preferably, only one of its cores), leaving all other cores for my own egoistic needs. I know that it will really impact system performance, but it is OK now.
So, I'd like to know if it is possible to achieve at all without messing with the kernel source code. Any links to the up-to-date articles about NUMA and SMP implementation details in Linux will be appreciated, too.
There are 2 possible kernel parameters:
I think in your case, maxcpus is the better choice
Add
to the kernel boot option
That implies that you want to actually use the other cores.
Before you start using using the other cores, use taskset to apply the affinity for all running user processes (including init). e.g.
Then set the affinity mask to everything else for the process which will launch your "egotistical needs", e.g.
You can't force the kernel to run on only one CPU (and it would be stupid anyway) unless you set the boot options which will only allow the system to access a single CPU.