summaryrefslogtreecommitdiff
path: root/kernel/rcutiny_plugin.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-04-16 18:49:22 +0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-06-11 00:45:53 +0400
commit14961444696effb2e660fe876e5c1880f8bc3932 (patch)
treeab62688a54cd44215b2658dc89f644755215fa16 /kernel/rcutiny_plugin.h
parent2439b696cb5303f1eeb6aeebcee19e0056c3dd6e (diff)
downloadlinux-14961444696effb2e660fe876e5c1880f8bc3932.tar.xz
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.h6
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)
rcp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check();
}
-#endif /* #ifdef CONFIG_RCU_TRACE */
-
static void reset_cpu_stall_ticks(struct rcu_ctrlblk *rcp)
{
-#ifdef CONFIG_RCU_TRACE
rcp->ticks_this_gp = 0;
rcp->gp_start = jiffies;
rcp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check();
-#endif /* #ifdef CONFIG_RCU_TRACE */
}
static void check_cpu_stalls(void)
@@ -174,3 +170,5 @@ static void check_cpu_stalls(void)
RCU_TRACE(check_cpu_stall(&rcu_bh_ctrlblk));
RCU_TRACE(check_cpu_stall(&rcu_sched_ctrlblk));
}
+
+#endif /* #ifdef CONFIG_RCU_TRACE */