Messages in this thread | | | Date | Thu, 11 Nov 2010 13:52:12 +0100 | From | Tejun Heo <> | Subject | Re: [PATCH RFC tip/core/rcu 11/12] rcu: fix race condition in synchronize_sched_expedited() |
| |
Hello,
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. :-)
-- tejun
| |