Skip to content
Commit ec5ef87b authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu/nocb: Use build-time no-CBs check in rcu_do_batch()



Currently, rcu_do_batch() invokes rcu_segcblist_is_offloaded() each time
it needs to know whether the current CPU is a no-CBs CPU.  Given that it
is not possible to change the no-CBs status of a CPU after boot, and given
that it is not possible to even have no-CBs CPUs in CONFIG_RCU_NOCB_CPU=n
kernels, this per-callback invocation wastes CPU.  This commit therefore
created a const on-stack variable to allow this check to be done only
once per rcu_do_batch() invocation.

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
parent 4f9c1bc7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment