]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rcu: Bind grace-period kthreads to non-NO_HZ_FULL CPUs
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 4 Jun 2014 20:46:03 +0000 (13:46 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 26 Jun 2014 17:59:40 +0000 (10:59 -0700)
commita424848670408739db5b496a7cb184e45aff05ee
tree9bf70ad27022b27981f02db936e900a3dbb4c3dd
parente17adc3f20bc9a14ca6a9b763402074519872c96
rcu: Bind grace-period kthreads to non-NO_HZ_FULL CPUs

Binding the grace-period kthreads to the timekeeping CPU resulted in
significant performance decreases for some workloads.  For more detail,
see:

https://lkml.org/lkml/2014/6/3/395 for benchmark numbers

https://lkml.org/lkml/2014/6/4/218 for CPU statistics

It turns out that it is necessary to bind the grace-period kthreads
to the timekeeping CPU only when all but CPU 0 is a nohz_full CPU
on the one hand or if CONFIG_NO_HZ_FULL_SYSIDLE=y on the other.
In other cases, it suffices to bind the grace-period kthreads to the
set of non-nohz_full CPUs.

This commit therefore creates a tick_nohz_not_full_mask that is the
complement of tick_nohz_full_mask, and then binds the grace-period
kthread to the set of CPUs indicated by this new mask, which covers
the CONFIG_NO_HZ_FULL_SYSIDLE=n case.  The CONFIG_NO_HZ_FULL_SYSIDLE=y
case still binds the grace-period kthreads to the timekeeping CPU.
This commit also includes the tick_nohz_full_enabled() check suggested
by Frederic Weisbecker.

Reported-by: Jet Chen <jet.chen@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Created housekeeping_affine() per fweisbec feedback. ]
include/linux/tick.h
kernel/rcu/tree_plugin.h
kernel/time/tick-sched.c