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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections
Date: Thu, 23 Jul 2015 07:35:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1


On 23/07/2015 04:56, Wen Congyang wrote:
>> > Otherwise, grace periods are detected too early!
> We always use qemu_thread_create() in qemu. So I think we can do it like this:
> wrapped_fn()
> {
>     rcu_register_thread();
>     call thread_fn() here
>     rcu_unregister_thread();
> }
> 
> So we will never forget to call rcu_register_thread() when creating a new 
> thread.

That's a good idea.  Would you like to propose a patch for 2.5?  Then we
can also use it to run the thread_atexit notifiers and avoid the bug
that Peter reported for OS X.

Paolo



reply via email to

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