Re: [PATCH] rcuwait: do not enter RCU protection unless a wakeup is needed

From: Paolo Bonzini
Date: Wed Oct 20 2021 - 07:38:02 EST


On 20/10/21 13:17, Peter Zijlstra wrote:
AFAICT, rcu_read_lock() for PREEMPT_RCU is:

WRITE_ONCE(current->rcu_read_lock_nesting, READ_ONCE(current->rcu_read_lock_nesting) + 1);
barrier();

rcu_read_unlock() is the expensive one if you need to go down rcu_read_unlock_special().

Paolo

Paul?