aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/gcc-common.h
diff options
context:
space:
mode:
authorWaiman Long <[email protected]>2021-08-27 02:21:22 +0000
committerPaul E. McKenney <[email protected]>2021-09-16 17:24:05 +0000
commit925da92ba5cb0c82d07cdd5049a07e40f54e9c44 (patch)
treed08eedefce6c6633753798c3ee93fbc02b63b3b9 /scripts/gcc-plugins/gcc-common.h
parentrcu: Fix existing exp request check in sync_sched_exp_online_cleanup() (diff)
downloadkernel-925da92ba5cb0c82d07cdd5049a07e40f54e9c44.tar.gz
kernel-925da92ba5cb0c82d07cdd5049a07e40f54e9c44.zip
rcu: Avoid unneeded function call in rcu_read_unlock()
Since commit aa40c138cc8f3 ("rcu: Report QS for outermost PREEMPT=n rcu_read_unlock() for strict GPs") the function rcu_read_unlock_strict() is invoked by the inlined rcu_read_unlock() function. However, rcu_read_unlock_strict() is an empty function in production kernels, which are built with CONFIG_RCU_STRICT_GRACE_PERIOD=n. There is a mention of rcu_read_unlock_strict() in the BPF verifier, but this is in a deny-list, meaning that BPF does not care whether rcu_read_unlock_strict() is ever called. This commit therefore provides a slight performance improvement by hoisting the check of CONFIG_RCU_STRICT_GRACE_PERIOD from rcu_read_unlock_strict() into rcu_read_unlock(), thus avoiding the pointless call to an empty function. Cc: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-common.h')
0 files changed, 0 insertions, 0 deletions