[ltt-dev] [rp] [PATCH urcu 4/4] Provide cleanup interfaces for per-CPU and per-thread call_rcu threads

Mathieu Desnoyers compudj at krystal.dyndns.org
Wed Mar 9 11:54:13 EST 2011


* Paolo Bonzini (pbonzini at redhat.com) wrote:
> On 03/09/2011 02:02 PM, Mathieu Desnoyers wrote:
>>    void call_rcu_before_fork_parent(void)
>>      pthread_mutex_lock(&call_rcu_mutex);
>>
>>    void call_rcu_after_fork_parent(void)
>>      pthread_mutex_unlock(&call_rcu_mutex);
>>
>>    void call_rcu_after_fork_child(void)
>>      allocate new default call_rcu_data
>>      dispose of old structures
>>      pthread_mutex_unlock(&call_rcu_mutex);
>
> These are just the three arguments to pthread_atfork, so they could be  
> replaced by a single call_rcu_init_atfork that calls pthread_atfork.

I'm just concerned about the execution order of the atfork callbacks. If
we provide the callbacks directly, then the application can take care to
call the various callbacks in a known order (e.g. first execute the
call_rcu functions, and then the RCU lib functions).

If we use atfork, the order will be pretty much random, and I'm not sure
I like that.

Thanks,

Mathieu


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




More information about the lttng-dev mailing list