Messages in this thread | | | Subject | Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU | From | Steven Rostedt <> | Date | Tue, 17 Aug 2010 12:06:39 -0400 |
| |
On Tue, 2010-08-17 at 12:04 -0400, Steven Rostedt wrote:
> > Then we could go for the simpler: > > > > --t->rcu_read_lock_nesting; > > barrier(); > > if (t->rcu_read_lock_nesting == 0 && > > unlikely((t->rcu_read_unlock_special)) > > Yeah, that's what I meant, I was too lazy to remove the ACCESS_ONCE() > from the cut and paste I did. > > > > > Which puts a constraint across all memory accesses. I'd be fine with > > that if you are afraid of too much micro-optimization (e.g. my > > barrier2(a, b) proposal). > > Not afraid, but just too much code for a simple solution.
IOW,
I think just pulling out the '--' and adding the barrier() is the proper solution here. Compiler barriers are rather cheap.
Can we all agree on this solution?
-- Steve
| |