Re: [Qemu-devel] [PATCH] rcu: optimize rcu_read_lock

2015-12-16 Thread Wen Congyang
On 12/16/2015 07:32 PM, Paolo Bonzini wrote: > rcu_read_lock cannot change rcu_gp_ongoing from true to false > (the previous value of p_rcu_reader->ctr is zero), hence > there is no need to check p_rcu_reader->waiting and wake up > a concurrent synchronize_rcu. > > While at it mark the wakeup as u

[Qemu-devel] [PATCH] rcu: optimize rcu_read_lock

2015-12-16 Thread Paolo Bonzini
rcu_read_lock cannot change rcu_gp_ongoing from true to false (the previous value of p_rcu_reader->ctr is zero), hence there is no need to check p_rcu_reader->waiting and wake up a concurrent synchronize_rcu. While at it mark the wakeup as unlikely in rcu_read_unlock. Signed-off-by: Paolo Bonzini