]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rcu: Provide OOM handler to motivate lazy RCU callbacks
authorPaul E. McKenney <paul.mckenney@linaro.org>
Tue, 12 Jun 2012 00:39:43 +0000 (17:39 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 20 Sep 2012 21:55:40 +0000 (14:55 -0700)
commite5c074322a3d372c6c1b9b1dbffaaf2f8a2f49cc
treefaa890eb79da0df6b9b0259c93fc5d8eee94ae63
parent4bad24196b767f6eec57e930f57fd69ba7a00f45
rcu: Provide OOM handler to motivate lazy RCU callbacks

In kernels built with CONFIG_RCU_FAST_NO_HZ=y, CPUs can accumulate a
large number of lazy callbacks, which as the name implies will be slow
to be invoked.  This can be a problem on small-memory systems, where the
default 6-second sleep for CPUs having only lazy RCU callbacks could well
be fatal.  This commit therefore installs an OOM hander that ensures that
every CPU with lazy callbacks has at least one non-lazy callback, in turn
ensuring timely advancement for these callbacks.

Updated to fix bug that disabled OOM killing, noted by Lai Jiangshan.

Updated to push the for_each_rcu_flavor() loop into rcu_oom_notify_cpu(),
thus reducing the number of IPIs, as suggested by Steven Rostedt.  Also
to make the for_each_online_cpu() loop be preemptible.  (Later, it might
be good to use smp_call_function(), as suggested by Peter Zijlstra.)

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
kernel/rcutree.h
kernel/rcutree_plugin.h