Re: Bisected post-3.9 regression: Resume takes 5 times as much timeas with v3.9
From: Joerg Roedel
Date: Tue May 14 2013 - 13:37:46 EST
Hi Paul,
On Mon, May 13, 2013 at 07:00:05AM -0700, Paul E. McKenney wrote:
> rcu: Fix comparison sense in rcu_needs_cpu()
>
> Commit c0f4dfd4f (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: Borislav Petkov <bp@xxxxxxxxx>
> Reported-by: Bjørn Mork <bjorn@xxxxxxx>
> Reported-by: Joerg Roedel <joro@xxxxxxxxxx>
> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Just tested the patch, it fixes the long boot delay for me. Thanks for
fixing this.
Tested-by: Joerg Roedel <joro@xxxxxxxxxx>
>
> diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> index 641991d..63098a5 100644
> --- a/kernel/rcutree_plugin.h
> +++ b/kernel/rcutree_plugin.h
> @@ -1692,7 +1692,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 {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/