1

I am conducting a kind of research in that I schedule multiple parallel applications (e.g., OpenMP/pthreaded applications) and execute the applications on specific (partitioned) cores on Linux-based multi-processor platforms.

We can set CPU affinities for each application by using sched_setaffinity() system call. But, as you know, Linux manages (all) running programs as well. So, the applications' executions that I scheduled are sometimes interrupted by other processes that Linux scheduled.

I want to set all processes and daemons (except for applications that I scheduled) to CPU 0. My first thought was to set CPU 0 manually by traversing all tasks from init task in a kernel module. But the result will be affected by Linux load-balancing. We need another way to somehow turn off or manage Linux CPU load balancing.

Is there any possible way or system configurations to do this? My target platform is AMD Opteron server (containing 64 cores) and Linux version is 3.19.

2

you should be able to disable the automated load-balancing by telling the kernel to only use the first N CPUs. e.g. adding the following to your boot-parameters, should effectively run the entire system on CPU #0 (as the system will only use a single CPU):

maxcpus=1

then use taskset or similar to run your process on a different CPU.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.