[ltt-dev] [PATCH] call_rcu: keep BUSY flag set as long as possible

Mathieu Desnoyers compudj at krystal.dyndns.org
Thu Jun 9 10:43:29 EDT 2011


* Paolo Bonzini (pbonzini at redhat.com) wrote:
> On 06/09/2011 04:09 PM, Mathieu Desnoyers wrote:
>> Would this be equivalent to not setting:
>>
>>    uatomic_set(&crdp->futex, 0);
>>
>> before breaking the loop, but then not decrementing
>>
>>    uatomic_dec(&crdp->futex);
>>
>> at the next loop iteration ?
>
> Something like that, yes.

Actually, my implementation had a problem with non-empty lists: it would
lead to decrementing the futex value below -1. commit
bc94ca9bada25f7403e3e859caa241146ae8e338 fixes this.

Thanks,

Mathieu

>
> Paolo
>

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




More information about the lttng-dev mailing list