提交 6faf7283 编写于 作者: P Paul E. McKenney

rcu: Fix comparison sense in rcu_needs_cpu()

Commit c0f4dfd4 (rcu: Make RCU_FAST_NO_HZ take advantage of numbered
callbacks) introduced a bug that can result in excessively long grace
periods.  This bug reverse the senes of the "if" statement checking
for lazy callbacks, so that RCU takes a lazy approach when there are
in fact non-lazy callbacks.  This can result in excessive boot, suspend,
and resume times.

This commit therefore fixes the sense of this "if" statement.
Reported-by: NBorislav Petkov <bp@alien8.de>
Reported-by: NBjørn Mork <bjorn@mork.no>
Reported-by: NJoerg Roedel <joro@8bytes.org>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: NBjørn Mork <bjorn@mork.no>
Tested-by: NJoerg Roedel <joro@8bytes.org>
上级 f722406f
......@@ -1667,7 +1667,7 @@ int rcu_needs_cpu(int cpu, unsigned long *dj)
rdtp->last_accelerate = jiffies;
/* Request timer delay depending on laziness, and round. */
if (rdtp->all_lazy) {
if (!rdtp->all_lazy) {
*dj = round_up(rcu_idle_gp_delay + jiffies,
rcu_idle_gp_delay) - jiffies;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册