Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Monday, August 16, 2010 - 12:19 pm

* Paul E. McKenney (paulmck@linux.vnet.ibm.com) wrote:

Hrm, --t->rcu_read_lock_nesting does not have any globally visible
side-effect, so the compiler is free to reorder the memory access across
the rcu_read_unlock_special access. I think we need the ACCESS_ONCE()
around the t->rcu_read_lock_nesting access too.


This seem to work because we have:

volatile access (read/update t->rcu_read_lock_nesting)
&& (sequence point)
volatile access (t->rcu_read_unlock_special)

The C standard seems to forbid reordering of volatile accesses across
sequence points, so this should be fine. But it would probably be good
to document this implied ordering explicitly.


I doubt so, see explanation above.


I am probably the one who was missing a subtlety about how
rcu_read_unlock_special() works.


It looks good then, I just wanted to ensure that the side-effects of
calling rcu_read_unlock() in this code path were well-thought.

Thanks,

Mathieu


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH tip/core/rcu 01/10] rcu head remove init, Paul E. McKenney, (Mon Aug 9, 3:15 pm)
[PATCH tip/core/rcu 07/10] rcu: Fix RCU_FANOUT help message, Paul E. McKenney, (Mon Aug 9, 3:15 pm)
[PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 9, 3:15 pm)
Re: [PATCH tip/core/rcu 09/10] rcu: update obsolete rcu_re ..., Mathieu Desnoyers, (Mon Aug 16, 7:45 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 8:07 am)
Re: [PATCH tip/core/rcu 09/10] rcu: update obsolete rcu_re ..., Paul E. McKenney, (Mon Aug 16, 10:55 am)
Re: [PATCH tip/core/rcu 09/10] rcu: update obsolete rcu_re ..., Mathieu Desnoyers, (Mon Aug 16, 11:24 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 11:33 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 12:19 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 2:32 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 2:41 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 2:55 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 3:07 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 3:24 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 6:27 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Tue Aug 17, 7:16 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Tue Aug 17, 7:35 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 7:54 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Tue Aug 17, 8:55 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 9:04 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 9:06 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Tue Aug 17, 9:25 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Tue Aug 17, 12:33 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Tue Aug 17, 1:00 pm)