History

rcuscale: Allow rcuscale without RCU Tasks Rude/Trace

Currently, a CONFIG_PREEMPT_NONE=y kernel substitutes normal RCU for RCU Tasks Rude and RCU Tasks Trace. Unless that kernel builds rcuscale, whether built-in or as a module, in which case these RCU Tasks flavors are (unnecessarily) built in. This both increases kernel size and increases the complexity of certain tracing operations. This commit therefore decouples the presence of rcuscale from the presence of RCU Tasks Rude and RCU Tasks Trace.

Paul E. McKenney committed 4 years ago

Commit 5ce027f1 parent 4df002d3 files · +13 −4Browse files

Unified · Split

3 files
  1. kernel/rcu/Kconfig.debug +0 −2
  2. kernel/rcu/rcuscale.c +11 −1
  3. tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon +2 −1
kernel/rcu/Kconfig.debug+0−2
@@ -28,8 +28,6 @@ config RCU_SCALE_TEST · 27 unmodified lines
2828 depends on DEBUG_KERNEL
2929 select TORTURE_TEST
3030 select SRCU
31− select TASKS_RUDE_RCU
32− select TASKS_TRACE_RCU
3331 default n
3432 help
3533 This option provides a kernel module that runs performance
kernel/rcu/rcuscale.c+11−1
@@ -305,6 +305,8 @@ static struct rcu_scale_ops tasks_ops = { · 304 unmodified lines
305305
306306 #endif // #else // #ifdef CONFIG_TASKS_RCU
307307
308+#ifdef CONFIG_TASKS_TRACE_RCU
309+
308310 /*
309311 * Definitions for RCU-tasks-trace scalability testing.
310312 */
@@ -334,6 +336,14 @@ static struct rcu_scale_ops tasks_tracing_ops = { · 23 unmodified lines
334336 .name = "tasks-tracing"
335337 };
336338
339+#define TASKS_TRACING_OPS &tasks_tracing_ops,
340+
341+#else // #ifdef CONFIG_TASKS_TRACE_RCU
342+
343+#define TASKS_TRACING_OPS
344+
345+#endif // #else // #ifdef CONFIG_TASKS_TRACE_RCU
346+
337347 static unsigned long rcuscale_seq_diff(unsigned long new, unsigned long old)
338348 {
339349 if (!cur_ops->gp_diff)
@@ -807,7 +817,7 @@ rcu_scale_init(void) · 467 unmodified lines
807817 long i;
808818 int firsterr = 0;
809819 static struct rcu_scale_ops *scale_ops[] = {
810− &rcu_ops, &srcu_ops, &srcud_ops, TASKS_OPS &tasks_tracing_ops
820+ &rcu_ops, &srcu_ops, &srcud_ops, TASKS_OPS TASKS_TRACING_OPS
811821 };
812822
813823 if (!torture_init_begin(scale_type, verbose))
tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon+2−1
@@ -1,5 +1,6 @@
11 CONFIG_RCU_SCALE_TEST=y
22 CONFIG_PRINTK_TIME=y
3−CONFIG_TASKS_RCU_GENERIC=y
43 CONFIG_FORCE_TASKS_RCU=y
54 #CHECK#CONFIG_TASKS_RCU=y
5+CONFIG_FORCE_TASKS_TRACE_RCU=y
6+#CHECK#CONFIG_TASKS_TRACE_RCU=y