What's the difference between the kernel boot parameters nohz_full and isolcpus=nohz

When isolating CPU cores for jitter-sensitive processes it is common to use both boot parameters nohz_full and isolcpus (I know the latter is deprecated in favor of cpusets, but it’s still around). isolcpus also has a nohz parameter. I wonder if it has the same effect as nohz_full?

Asked By: Manuel Bernhardt

||

Initially, the nohz_full kernel parameter was meant to only (*) :

set the specified list of CPUs whose tick will be stopped whenever
possible.

When isolcpus was meant to (*) :

Specify one or more CPUs to isolate from disturbances specified in the
flag list

Disturbance depicts a much wider area than the timer tick only.
As a matter of fact, if work queues are shared among all CPUs and the scheduler algorithms must consequently run on all these CPUs for loadbalance’s sake… this also consists in a disturbance nohz_full won’t prevent from when isolcpus will.

This patch (from 2015) even acknowledged that :

nohz_full is only useful with isolcpus also set, since otherwise the
scheduler has to run periodically to try to determine whether to steal
work from other cores.

And made so that :

when booting with nohz_full=xxx on the command line, we should act as
if isolcpus=xxx was also set, and set (or extend) the isolcpus set to
include the nohz_full cpus.

Therefore… we can nowadays consider that :
if the specified sets of CPUs are identical, it is no longer necessary to specify both parameters.


(*) quoting The Linux kernel user’s and administrator’s guide

Answered By: MC68020
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.