[ltt-dev] [PATCH 5/7] urcu, call_rcu: avoid create call_rcu_data for child when unneed

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Sep 29 13:52:16 EDT 2011


* Paul E. McKenney (paulmck at linux.vnet.ibm.com) wrote:
> On Wed, Sep 28, 2011 at 04:34:31PM +0800, Lai Jiangshan wrote:
> > Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
> 
> Nice optimization!!!
> 
> Reviewed-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>

Merged,

Thanks for both of you for the patch and review.

Mathieu

> 
> > ---
> >  urcu-call-rcu-impl.h |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h
> > index 87d9157..65c1c7a 100644
> > --- a/urcu-call-rcu-impl.h
> > +++ b/urcu-call-rcu-impl.h
> > @@ -675,6 +675,10 @@ void call_rcu_after_fork_child(void)
> >  	/* Release the mutex. */
> >  	call_rcu_unlock(&call_rcu_mutex);
> > 
> > +	/* Do nothing when call_rcu() has not been used */
> > +	if (cds_list_empty(&call_rcu_data_list))
> > +		return;
> > +
> >  	/*
> >  	 * Allocate a new default call_rcu_data structure in order
> >  	 * to get a working call_rcu thread to go with it.
> > -- 
> > 1.7.4.4
> > 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list