summaryrefslogtreecommitdiffstats
path: root/include/linux/rcutree.h
diff options
context:
space:
mode:
authorPaul E. McKenney2013-11-18 04:27:16 +0100
committerPaul E. McKenney2014-02-18 01:03:09 +0100
commitffa83fb565fbc397cbafb4b71fd1cce276d4c3b6 (patch)
treec849b1ea3517d6853b7b4cd386a682187e314f09 /include/linux/rcutree.h
parentrcu: Optimize rcu_is_nocb_cpu() for RCU_NOCB_CPU_ALL (diff)
downloadkernel-qcow2-linux-ffa83fb565fbc397cbafb4b71fd1cce276d4c3b6.tar.gz
kernel-qcow2-linux-ffa83fb565fbc397cbafb4b71fd1cce276d4c3b6.tar.xz
kernel-qcow2-linux-ffa83fb565fbc397cbafb4b71fd1cce276d4c3b6.zip
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>
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r--include/linux/rcutree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 72137ee8c603..81198c84e268 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -31,7 +31,9 @@
#define __LINUX_RCUTREE_H
void rcu_note_context_switch(int cpu);
+#ifndef CONFIG_RCU_NOCB_CPU_ALL
int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies);
+#endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */
void rcu_cpu_stall_reset(void);
/*