How to exclusively assign process to a core?
i need to exclusively assign a process to a core on SMP system.
I should do that with a kernel module not in user-mode.
Is possible to do that?
Try CGroups mechanism. First you should enable appropriate options in your kernel. They are CONFIG_GROUP_SCHED and CONFIG_CGROUPS afair.
Then check this guide, it's very detail (its from Documentation/cgroups).
However, try man taskset. Maybe it will be enough.
I tried CGroup, but it doesn't assign exclusively a process to core.
I have 4 cores, 20 processes.
Process 1 -> Core 1
Processes 2-19 -> Core 2-4
Every time a new process has been created it doesn't must be assigned to Core 1.
Well. How do you initiate your cgroups?
Maybe you should try to arrange cpuset1 for core1, cpuset2 for cores2-4.
Then add needed process to cpuset1 and all other processes, including init, to cpuset2. Thus, all new processes should be in cpuset2.
P.S. I have no possibility to test it today. Maybe in 1-2 days.
Ok. I'll try it soon.
P.S.: I read about cpuset.cpu_exclusive, is it a possible solution?
Thank you for your help :-)
|All times are GMT -5. The time now is 01:52 PM.|