`isolcpus` kernel parameter has no effect on Ubuntu 16.04 desktop
I would guess those two processes are kworker
or another kernel task.
It appears that presently, isolcpus=
only affects user space threads, and hence, kernel threads will show up on the isolated CPU's.
From the RHEL documentation (emphasis mine),
3.3.6.2. Isolating CPUs
You can isolate one or more CPUs from the scheduler with the isolcpus boot parameter. This prevents the scheduler from scheduling any user-space threads on this CPU. Once a CPU is isolated, you must manually assign processes to the isolated CPU, either with the CPU affinity system calls or the numactl command.
Someone tried to patch this behaviour, but as far as I can tell, it wasn't acked.
In summary, Ubuntu isn't ignoring the option, it's working as intended. Whether it's working as desired is a different query.
Related videos on Youtube
nom
Updated on September 18, 2022Comments
-
nom over 1 year
I added the following line to
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=1,3"
then ran
sudo grub-update
(and rebooted) but according totop
processes are still being scheduled on CPU 1 and 3. What should I do about this?Things I was asked to add:
nabeel@nabeel-Inspiron-3542:~$ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic.efi.signed root=UUID=1e46ca65-843f-439a-8e2a-f5e666a03ffe ro quiet splash isolcpus=1,3 vt.handoff=7
Output of
top
:PID USER PR S P 182 root 20 S 0 183 root 0 S 0 220 root 20 S 0 223 root 20 S 0 253 root 20 S 2 261 root 0 S 0 312 root -51 S 0 343 root 0 S 3 <-------- Processes being scheduled on CPU 1 and 3 347 root 0 S 1 <-------- 373 root 0 S 2 398 root 0 S 0 474 root 0 S 2 478 root 20 S 0 548 systemd+ 20 S 0 632 avahi 20 S 2 633 root 20 S 2 642 root 20 S 0
-
Admin almost 8 yearsDid you reboot?
-
Admin almost 8 years@EightBitTony Yeah, I did.
-
Admin almost 8 yearsCan you add the output of
cat /proc/cmdline
to your question? And, show the output fromtop
which shows which CPU's have processes on them. -
Admin almost 8 yearsWhat are those two processes? e.g. are they
kworker
or something similar? -
Admin almost 6 yearsI've found that .. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=3,7" ... only works with grub2 on Skylake "client" (i.e. consumer devices)
-
-
nom almost 8 yearsYou are right, they are kworker threads (and there are a lot of them), but doesn't that defeat the point of isolating a CPU?
-
EightBitTony almost 8 yearsIt depends, but that's how the option works, so it is working as expected.