lkml.org 
[lkml]   [2010]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC tip/core/rcu] accelerate grace period if last non-dynticked CPU
From
Date
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
needed:


for_each_online_cpu(thatcpu) {
if (thatcpu != cpu && !cpumask_test_cpu(thatcpu, nohz_cpu_mask)
return rcu_needs_cpu_quick_check(cpu);
}

-- Steve




\
 
 \ /
  Last update: 2010-01-25 16:11    [W:0.116 / U:3.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site