Messages in this thread |  | | From | Lai Jiangshan <> | Date | Fri, 22 Oct 2021 12:11:55 +0800 | Subject | Re: [PATCH] rcuwait: do not enter RCU protection unless a wakeup is needed |
| |
On Wed, Oct 20, 2021 at 7:39 PM Paolo Bonzini <pbonzini@redhat.com> wrote: > > 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(). >
If "actual likelihood of a wakeup is very low." as stated in the changelog, the likelihood of rcu_read_unlock_special() is also very low.
rcu_read_lock() for PREEMPT_RCU is a function call, is it relevant?
(It is possible to remove the function call if the include-hell can be resolved or remove the function call via LTO or just remove the function call in X86 via percpu.)
Thanks Lai
> Paolo > > > Paul? >
|  |