diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-12-07 16:09:52 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-12-07 19:59:37 -0500 |
commit | 79cfea0273876d9c438f3227b8f68c8c7ae31583 (patch) | |
tree | b147a1c382fd50ac1ee5113ea851b517bf3405df /kernel/rcu/update.c | |
parent | 3e42ec1aa716f10c68294b8492ae3ea684528699 (diff) |
rcu: Remove TINY_RCU bloat from pointless boot parameters
The rcu_expedited, rcu_normal, and rcu_normal_after_boot kernel boot
parameters are pointless in the case of TINY_RCU because in that case
synchronous grace periods, both expedited and normal, are no-ops.
However, these three symbols contribute several hundred bytes of bloat.
This commit therefore uses CPP directives to avoid compiling this code
in TINY_RCU kernels.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcu/update.c')
-rw-r--r-- | kernel/rcu/update.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 12b91f5a60a6..76b94e19430b 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c | |||
@@ -60,11 +60,12 @@ MODULE_ALIAS("rcupdate"); | |||
60 | #endif | 60 | #endif |
61 | #define MODULE_PARAM_PREFIX "rcupdate." | 61 | #define MODULE_PARAM_PREFIX "rcupdate." |
62 | 62 | ||
63 | #ifndef CONFIG_TINY_RCU | ||
63 | module_param(rcu_expedited, int, 0); | 64 | module_param(rcu_expedited, int, 0); |
64 | module_param(rcu_normal, int, 0); | 65 | module_param(rcu_normal, int, 0); |
65 | |||
66 | static int rcu_normal_after_boot; | 66 | static int rcu_normal_after_boot; |
67 | module_param(rcu_normal_after_boot, int, 0); | 67 | module_param(rcu_normal_after_boot, int, 0); |
68 | #endif /* #ifndef CONFIG_TINY_RCU */ | ||
68 | 69 | ||
69 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) && defined(CONFIG_PREEMPT_COUNT) | 70 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) && defined(CONFIG_PREEMPT_COUNT) |
70 | /** | 71 | /** |
@@ -172,8 +173,6 @@ void rcu_unexpedite_gp(void) | |||
172 | } | 173 | } |
173 | EXPORT_SYMBOL_GPL(rcu_unexpedite_gp); | 174 | EXPORT_SYMBOL_GPL(rcu_unexpedite_gp); |
174 | 175 | ||
175 | #endif /* #ifndef CONFIG_TINY_RCU */ | ||
176 | |||
177 | /* | 176 | /* |
178 | * Inform RCU of the end of the in-kernel boot sequence. | 177 | * Inform RCU of the end of the in-kernel boot sequence. |
179 | */ | 178 | */ |
@@ -185,6 +184,8 @@ void rcu_end_inkernel_boot(void) | |||
185 | WRITE_ONCE(rcu_normal, 1); | 184 | WRITE_ONCE(rcu_normal, 1); |
186 | } | 185 | } |
187 | 186 | ||
187 | #endif /* #ifndef CONFIG_TINY_RCU */ | ||
188 | |||
188 | #ifdef CONFIG_PREEMPT_RCU | 189 | #ifdef CONFIG_PREEMPT_RCU |
189 | 190 | ||
190 | /* | 191 | /* |