qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU re


From: Wen Congyang
Subject: Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections
Date: Fri, 24 Jul 2015 14:30:24 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 07/24/2015 02:22 PM, Paolo Bonzini wrote:
> 
> 
> On 24/07/2015 07:56, Wen Congyang wrote:
>> @@ -115,9 +116,12 @@ static void wait_for_readers(void)
>>          }
>>  
>>          /* Wait for one thread to report a quiescent state and
>> -         * try again.
>> +         * try again. Release rcu_gp_lock, so rcu_(un)register_thread()
>> +         * doesn't wait too much time.
>>           */
>> +        qemu_mutex_unlock(&rcu_gp_lock);
>>          qemu_event_wait(&rcu_gp_event);
>> +        qemu_mutex_lock(&rcu_gp_lock);
>>      }
>>  
> 
> So in this case rcu_unregister_thread could actually remove the node
> from synchronize_rcu's qsreaders, not just from registry.  That's a bit
> tricky, but it should work.  Please add a comment, however.
> 
> Also, please rename "rcu_gp_lock" as well to rcu_registry_lock.  We'll
> get the patches in QEMU 2.5.


OK, I will do it.

Thanks
Wen Congyang

> 
> Paolo
> .
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]