Messages in this thread |  | | Date | Thu, 17 Oct 2013 16:06:04 +0530 | From | Srikar Dronamraju <> | Subject | Re: [PATCH 2/6] rcu: Create rcu_sync infrastructure |
| |
* Peter Zijlstra <peterz@infradead.org> [2013-10-08 12:25:07]:
> From: Oleg Nesterov <oleg@redhat.com> > > It is functionally equivalent to > > struct rcu_sync_struct { > atomic_t counter; > }; > > static inline bool rcu_sync_is_idle(struct rcu_sync_struct *xxx) > { > return atomic_read(&xxx->counter) == 0; > } > > static inline void rcu_sync_enter(struct rcu_sync_struct *xxx) > { > atomic_inc(&xxx->counter); > synchronize_sched(); > } > > static inline void rcu_sync_enter(struct rcu_sync_struct *xxx)
Guess you meant rcu_sync_exit
> { > synchronize_sched(); > atomic_dec(&xxx->counter); > } > > except: it records the state and synchronize_sched() is only called by > rcu_sync_enter() and only if necessary. >
-- Thanks and Regards Srikar Dronamraju
|  |