K
K
KrD2013-11-09 12:12:05
linux
KrD, 2013-11-09 12:12:05

Isolate selected processors during kernel boot phase?

Good afternoon, ${HabraUser}!
I wondered: how to free up several processors for certain tasks on an SMP system so that other tasks are processed strictly on the rest. After some searching, I found the true Linux way - the isolcpus kernel parameter . According to the documentation , this option provides the correct solution for isolating the list of processors, rather than passing cpuset through all processes.
As expected, added "isolcpus=4-7" to /etc/default/grub, then sudo update-grub and after reboot. However, the joy was premature: for some reason, cpu affinity remained the same.
PS: Debian GNU/Linux Wheezy amd64, kernel 3.10.11, using BFS .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KrD, 2013-11-09
@KrD

A much more flexible solution was found: use cgroups to create two groups z0 and z1.

# cd /sys/fs/cgroup/cpuset
# egrep -m1 -He^ cpuset.{cpus,cpu_exclusive,mems,mem_exclusive}
cpuset.cpus:0-7
cpuset.cpu_exclusive:1
cpuset.mems:0
cpuset.mem_exclusive:1

# cd /sys/fs/cgroup/cpuset/z0
# egrep -m1 -He^ cpuset.{cpus,cpu_exclusive,mems,mem_exclusive}
cpuset.cpus:0-3
cpuset.cpu_exclusive:1
cpuset.mems:0
cpuset.mem_exclusive:0

# cd /sys/fs/cgroup/cpuset/z1
# egrep -m1 -He^ cpuset.{cpus,cpu_exclusive,mems,mem_exclusive}
cpuset.cpus:4-7
cpuset.cpu_exclusive:1
cpuset.mems:0
cpuset.mem_exclusive:0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question