aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-03-26 18:47:24 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2013-04-19 07:54:04 -0400
commitd1e43fa5f8bb25f83a86a29f11fcfb57ed4d7566 (patch)
tree9eff00255c1061248b6aef2c8341ea527610150c /include
parent0453b435df0d69dd0d8c42eb9b3015aaf0d8a032 (diff)
nohz: Ensure full dynticks CPUs are RCU nocbs
We need full dynticks CPU to also be RCU nocb so that we don't have to keep the tick to handle RCU callbacks. Make sure the range passed to nohz_full= boot parameter is a subset of rcu_nocbs= The CPUs that fail to meet this requirement will be excluded from the nohz_full range. This is checked early in boot time, before any CPU has the opportunity to stop its tick. Suggested-by: Steven Rostedt <rostedt@goodmis.org> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Christoph Lameter <cl@linux.com> Cc: Geoff Levand <geoff@infradead.org> Cc: Gilad Ben Yossef <gilad@benyossef.com> Cc: Hakan Akkan <hakanakkan@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kevin Hilman <khilman@linaro.org> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rcupdate.h7
-rw-r--r--include/linux/tick.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index b758ce17b309..8e0948c872fc 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -999,4 +999,11 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
999#define kfree_rcu(ptr, rcu_head) \ 999#define kfree_rcu(ptr, rcu_head) \
1000 __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) 1000 __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head))
1001 1001
1002#ifdef CONFIG_RCU_NOCB_CPU
1003extern bool rcu_is_nocb_cpu(int cpu);
1004#else
1005static inline bool rcu_is_nocb_cpu(int cpu) { return false; }
1006#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
1007
1008
1002#endif /* __LINUX_RCUPDATE_H */ 1009#endif /* __LINUX_RCUPDATE_H */
diff --git a/include/linux/tick.h b/include/linux/tick.h
index b4e3b0c9639e..0b6873cbf512 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -158,8 +158,10 @@ static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; }
158# endif /* !CONFIG_NO_HZ_COMMON */ 158# endif /* !CONFIG_NO_HZ_COMMON */
159 159
160#ifdef CONFIG_NO_HZ_FULL 160#ifdef CONFIG_NO_HZ_FULL
161extern void tick_nohz_init(void);
161extern int tick_nohz_full_cpu(int cpu); 162extern int tick_nohz_full_cpu(int cpu);
162#else 163#else
164static inline void tick_nohz_init(void) { }
163static inline int tick_nohz_full_cpu(int cpu) { return 0; } 165static inline int tick_nohz_full_cpu(int cpu) { return 0; }
164#endif 166#endif
165 167