I have a Linux machine with 16 cores in it.
// uname -a
Linux lndbxdev01 2.6.24.7-108.el5rt #1 SMP PREEMPT RT
Mon Mar 23 10:58:10 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
// OS detail
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
I would like to schedule process affinity so that 1 CPU will be
entirely dedicated to 1 process.
When I say entirely dedicated I mean that I want really to bound
any other running deamons, IRQ-nnnn, rpciod/nn, etc. to all CPUs
available except for the one my process is interested.
( on my OS I can count around 500 processes ).
- by doing that is it safe or should I care for letting some of them on the CPU where they are currently running?
- If I bind at least IRQs will the performance be better?
Since these are connected to interrupts, which are triggered frequently,
they induce a frequent process context switch since the kernel has to call those.
I am expecting the following benefits:
- because there will be one single process running a single CPU
there will be NO process context switch at all. - the time slice assigned to my process on that CPU
will be increased so it will run longer before a process context switch ( if any ).
Kind Regards
AFG
I guess cpusets can help you overcome this problem. You can define an exclusive cpuset for one of the CPUs and bind the process to that specific cpuset.
http://www.kernel.org/doc/man-pages/online/pages/man7/cpuset.7.html
You might find cset usefule:
http://code.google.com/p/cpuset/
If you are not willing to use any of them, then you need to write your own c code to schedule the process on a specific cpu (using sched_setaffinity) and disable all interrupts on that specific cpu.
I hope it helps.