]> git.karo-electronics.de Git - linux-beck.git/commit
rcu: Throttle rcu_try_advance_all_cbs() execution
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 26 Aug 2013 04:20:47 +0000 (21:20 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 25 Sep 2013 13:44:25 +0000 (06:44 -0700)
commitc229828ca6bc62d6c654f64b1d1b8a9ebd8a56f3
treeaa97acce16acc6ead3013fecc17bdc51d0d0edda
parent7a497c963eceac42677ce1f5d7bb470abedd15f4
rcu: Throttle rcu_try_advance_all_cbs() execution

The rcu_try_advance_all_cbs() function is invoked on each attempted
entry to and every exit from idle.  If this function determines that
there are callbacks ready to invoke, the caller will invoke the RCU
core, which in turn will result in a pair of context switches.  If a
CPU enters and exits idle extremely frequently, this can result in
an excessive number of context switches and high CPU overhead.

This commit therefore causes rcu_try_advance_all_cbs() to throttle
itself, refusing to do work more than once per jiffy.

Reported-by: Tibor Billes <tbilles@gmx.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Tibor Billes <tbilles@gmx.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
kernel/rcutree.h
kernel/rcutree_plugin.h