lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU
From
Date
On Tue, 2010-08-17 at 11:55 -0400, Mathieu Desnoyers wrote:

> > Heck, this is too much micro optimization. We could just be safe and do
> > the:
> > --t->rcu_read_lock_nesting;
> > barrier();
> > if (ACCESS_ONCE(t->rcu_read_lock_nesting) == 0 &&
> > unlikely((ACCESS_ONCE(t->rcu_read_unlock_special)))
> >
> > And be done with it.
>
> 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.

-- Steve




\
 
 \ /
  Last update: 2010-08-17 18:07    [from the cache]
©2003-2011 Jasper Spaans