[ltt-dev] [PATCH 0/3] Fixes for threads that are readers and writers, and lock-free queue example
Paolo Bonzini
pbonzini at redhat.com
Mon Mar 1 16:30:14 EST 2010
On 03/01/2010 09:42 PM, Mathieu Desnoyers wrote:
> * Paolo Bonzini (pbonzini at redhat.com) wrote:
>> On 03/01/2010 09:14 PM, Mathieu Desnoyers wrote:
>>> These unpaired lock/unlock are causing this problem.
>>
>> Uh-oh. True.
>>
>> However, the fact that a thread cannot be unregistered and then
>> reregistered remains, no?
>
> I fail to see the problem here ? Can you be more specific ?
This sequence fails:
rcu_register_thread();
... some critical sections and grace periods here ...
rcu_unregister_thread();
... nothing uses RCU here...
rcu_register_thread(); // assertion failure on rcu_reader.ctr == 0
Is this also explicitly prohibited? My patch happens to fix this too.
(Of course there's no need to introduce _rcu_thread_{on,off}line, a one
liner is enough).
Paolo
More information about the lttng-dev
mailing list