[lkml]   [2010]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RFC tip/core/rcu 11/12] rcu: fix race condition in synchronize_sched_expedited()

On 11/11/2010 01:31 PM, Paul E. McKenney wrote:
> Actually, the memory barriers are still one source of discomfort to me.
> I am concerned about the path out of the function that skips the
> atomic_cmpxchg(), which seem to happen if some concurrent invocation
> advances the "done" counter past us before we get around to checking it.
> I agree on the atomic_inc_return() upon entry to the function, though.

Oooh, you're right. It needs to be smp_mb(). We can put it right
before break but I don't think it would worth the ugliness.

> And this is going to need some serious testing either way. ;-)

Definitely. This is a scary piece of code. :-)


 \ /
  Last update: 2010-11-11 13:55    [from the cache]
©2003-2011 Jasper Spaans