Re: [PATCH RFC tip/core/rcu] accelerate grace period if lastnon-dynticked CPU
From: Steven Rostedt
Date: Mon Jan 25 2010 - 10:08:32 EST
On Mon, 2010-01-25 at 20:28 +0800, Lai Jiangshan wrote:
> Paul E. McKenney wrote:
> > + /* Don't bother unless we are the last non-dyntick-idle CPU. */
> > + for_each_cpu(thatcpu, nohz_cpu_mask)
> > + if (thatcpu != cpu)
> > + return rcu_needs_cpu_quick_check(cpu);
> The comment and the code are not the same, I think.
I once heard this quote, but I don't know who said it:
"If the comment and the code do not match, they probably are both wrong"
Anyway, you are correct, the comment does not match, but I think the
code is wrong. The code returns if any cpu is in non-dyntick-idle state.
Reading the change log, that looks wrong. Perhaps this is what was
if (thatcpu != cpu && !cpumask_test_cpu(thatcpu, nohz_cpu_mask)
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/