diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-04-16 10:49:22 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-06-10 16:45:53 -0400 |
commit | 14961444696effb2e660fe876e5c1880f8bc3932 (patch) | |
tree | ab62688a54cd44215b2658dc89f644755215fa16 /kernel/rcutiny_plugin.h | |
parent | 2439b696cb5303f1eeb6aeebcee19e0056c3dd6e (diff) |
rcu: Shrink TINY_RCU by reworking CPU-stall ifdefs
TINY_RCU's reset_cpu_stall_ticks() and check_cpu_stalls() functions
are defined unconditionally, and are empty functions if CONFIG_RCU_TRACE
is disabled (which in turns disables detection of RCU CPU stalls).
This commit saves a few lines of source code by defining these functions
only if CONFIG_RCU_TRACE=y.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutiny_plugin.h')
-rw-r--r-- | kernel/rcutiny_plugin.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h index 65ef1800f4fd..0cd385acccfa 100644 --- a/kernel/rcutiny_plugin.h +++ b/kernel/rcutiny_plugin.h | |||
@@ -158,15 +158,11 @@ static void check_cpu_stall(struct rcu_ctrlblk *rcp) | |||
158 | rcp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check(); | 158 | rcp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check(); |
159 | } | 159 | } |
160 | 160 | ||
161 | #endif /* #ifdef CONFIG_RCU_TRACE */ | ||
162 | |||
163 | static void reset_cpu_stall_ticks(struct rcu_ctrlblk *rcp) | 161 | static void reset_cpu_stall_ticks(struct rcu_ctrlblk *rcp) |
164 | { | 162 | { |
165 | #ifdef CONFIG_RCU_TRACE | ||
166 | rcp->ticks_this_gp = 0; | 163 | rcp->ticks_this_gp = 0; |
167 | rcp->gp_start = jiffies; | 164 | rcp->gp_start = jiffies; |
168 | rcp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check(); | 165 | rcp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check(); |
169 | #endif /* #ifdef CONFIG_RCU_TRACE */ | ||
170 | } | 166 | } |
171 | 167 | ||
172 | static void check_cpu_stalls(void) | 168 | static void check_cpu_stalls(void) |
@@ -174,3 +170,5 @@ static void check_cpu_stalls(void) | |||
174 | RCU_TRACE(check_cpu_stall(&rcu_bh_ctrlblk)); | 170 | RCU_TRACE(check_cpu_stall(&rcu_bh_ctrlblk)); |
175 | RCU_TRACE(check_cpu_stall(&rcu_sched_ctrlblk)); | 171 | RCU_TRACE(check_cpu_stall(&rcu_sched_ctrlblk)); |
176 | } | 172 | } |
173 | |||
174 | #endif /* #ifdef CONFIG_RCU_TRACE */ | ||