lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU
On Tue, Aug 17, 2010 at 05:36:13PM +0800, Lai Jiangshan wrote:
> On 08/17/2010 06:24 AM, Paul E. McKenney wrote:
>
> >> --(t->rcu_read_lock_nesting)
> >>
> >> could be split in two distinct operations:
> >>
> >> read t->rcu_read_lock_nesting
> >> decrement t->rcu_read_lock_nesting
> >>
> >> Note that in order to know the result required to pass the sequence
> >> point "&&" (the test), we only need to perform the read, not the
> >> decrement. AFAIU, gcc would be in its rights to move the
> >> t->rcu_read_lock_nesting update after the volatile access.
> >
> > I will run this by some compiler experts.
>
> We can just use "read and decrement statements" instead of "--" to
> avoid dependency from compilers.

You mean something like local_add_return()? This turns into
atomic_add_return() on many platforms, including x86 as it turns out,
so I am reluctant to use it.

If you had something else in mind, please don't keep it a secret!

Thanx, Paul


\
 
 \ /
  Last update: 2010-08-17 16:39    [W:0.111 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site