Who's counting jiffies when all CPUs idle in NO_HZ mode?

Who's counting jiffies when all CPUs idle in NO_HZ mode?

Oleg Goldshmidt pub at goldshmidt.org
Wed Mar 26 00:01:04 IST 2014


Elazar Leibovich <elazarl at gmail.com> writes:

> So to my understanding, if all CPUs are idle, nothing is going to run
> on any CPU.

Well, there are a few special system processes on every UNIX system:

* swapper/scheduler (pid == 0); NB: this guy is not created by fork(2),
  hence there is no confusion when fork(2) returns 0 for the child;
* init (pid == 1) - all "normal" processes are forked off this one or
  one of its descendants;
* pagedaemon (pid == 2) - a system process that supports vurtual memory
  paging.

I am not sure that "all CPUs are idle" is a realistic situation in light
of these special processes. A situation where some of the CPUs are
either idle or run a single process (and thus no scheduling interrupts
need to be delivered to them) is, however, possible, and that seems to
be what is described in the docs.

-- 
Oleg Goldshmidt | pub at goldshmidt.org



More information about the Linux-il mailing list