rcu: Optimize rcu_needs_cpu() for RCU_NOCB_CPU_ALL

If CONFIG_RCU_NOCB_CPU_ALL=y, then rcu_needs_cpu() will always
return false, however, the current version nevertheless checks
for RCU callbacks.  This commit therefore creates a static inline
implementation of rcu_needs_cpu() that unconditionally returns false
when CONFIG_RCU_NOCB_CPU_ALL=y.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
Paul E. McKenney
2013-11-17 19:27:16 -08:00
parent 2f33b512a5
commit ffa83fb565
5 changed files with 15 additions and 7 deletions

View File

@@ -68,12 +68,6 @@ static inline void kfree_call_rcu(struct rcu_head *head,
call_rcu(head, func);
}
static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies)
{
*delta_jiffies = ULONG_MAX;
return 0;
}
static inline void rcu_note_context_switch(int cpu)
{
rcu_sched_qs(cpu);