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
28 depends on DEBUG_KERNEL28 depends on DEBUG_KERNEL
29 select TORTURE_TEST29 select TORTURE_TEST
30 select SRCU30 select SRCU
31 select TASKS_RUDE_RCU
32 select TASKS_TRACE_RCU
33 default n31 default n
34 help32 help
35 This option provides a kernel module that runs performance33 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
305 305
306#endif // #else // #ifdef CONFIG_TASKS_RCU306#endif // #else // #ifdef CONFIG_TASKS_RCU
307 307
308#ifdef CONFIG_TASKS_TRACE_RCU
309
308/*310/*
309 * Definitions for RCU-tasks-trace scalability testing.311 * Definitions for RCU-tasks-trace scalability testing.
310 */312 */
@@ -334,6 +336,14 @@ static struct rcu_scale_ops tasks_tracing_ops = { · 23 unmodified lines
334 .name = "tasks-tracing"336 .name = "tasks-tracing"
335};337};
336 338
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
337static unsigned long rcuscale_seq_diff(unsigned long new, unsigned long old)347static unsigned long rcuscale_seq_diff(unsigned long new, unsigned long old)
338{348{
339 if (!cur_ops->gp_diff)349 if (!cur_ops->gp_diff)
@@ -807,7 +817,7 @@ rcu_scale_init(void) · 467 unmodified lines
807 long i;817 long i;
808 int firsterr = 0;818 int firsterr = 0;
809 static struct rcu_scale_ops *scale_ops[] = {819 static struct rcu_scale_ops *scale_ops[] = {
810 &rcu_ops, &srcu_ops, &srcud_ops, TASKS_OPS &tasks_tracing_ops820 &rcu_ops, &srcu_ops, &srcud_ops, TASKS_OPS TASKS_TRACING_OPS
811 };821 };
812 822
813 if (!torture_init_begin(scale_type, verbose))823 if (!torture_init_begin(scale_type, verbose))
tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon+2−1
@@ -1,5 +1,6 @@
1CONFIG_RCU_SCALE_TEST=y1CONFIG_RCU_SCALE_TEST=y
2CONFIG_PRINTK_TIME=y2CONFIG_PRINTK_TIME=y
3CONFIG_TASKS_RCU_GENERIC=y
4CONFIG_FORCE_TASKS_RCU=y3CONFIG_FORCE_TASKS_RCU=y
5#CHECK#CONFIG_TASKS_RCU=y4#CHECK#CONFIG_TASKS_RCU=y
5CONFIG_FORCE_TASKS_TRACE_RCU=y
6#CHECK#CONFIG_TASKS_TRACE_RCU=y