]> git.baikalelectronics.ru Git - kernel.git/commit
NOHZ: Check for nohz active instead of nohz enabled
authorThomas Gleixner <tglx@linutronix.de>
Wed, 13 Nov 2013 20:01:57 +0000 (21:01 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 19 Nov 2013 13:59:50 +0000 (14:59 +0100)
commitf6eb4c155d1c4c8186c9ca631d2982c37c0bc2f4
tree2ddb3ee24ce9fd2566a6fb9204ea9861a74a7404
parentf98d098f2b01cc3b50ffa4c4d05aefb06a04f7be
NOHZ: Check for nohz active instead of nohz enabled

RCU and the fine grained idle time accounting functions check
tick_nohz_enabled. But that variable is merily telling that NOHZ has
been enabled in the config and not been disabled on the command line.

But it does not tell anything about nohz being active. That's what all
this should check for.

Matthew reported, that the idle accounting on his old P1 machine
showed bogus values, when he enabled NOHZ in the config and did not
disable it on the kernel command line. The reason is that his machine
uses (refined) jiffies as a clocksource which explains why the "fine"
grained accounting went into lala land, because it depends on when the
system goes and leaves idle relative to the jiffies increment.

Provide a tick_nohz_active indicator and let RCU and the accounting
code use this instead of tick_nohz_enable.

Reported-and-tested-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: john.stultz@linaro.org
Cc: mwhitehe@redhat.com
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311132052240.30673@ionos.tec.linutronix.de
kernel/rcu/tree_plugin.h
kernel/time/tick-sched.c