[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: |
Fri, 24 Jul 2015 08:22:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
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.
Paolo
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, (continued)
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Wen Congyang, 2015/07/22
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Christian Borntraeger, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Paolo Bonzini, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Wen Congyang, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Paolo Bonzini, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Wen Congyang, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Paolo Bonzini, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Wen Congyang, 2015/07/23
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Wen Congyang, 2015/07/24
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections, Wen Congyang, 2015/07/24