summaryrefslogtreecommitdiff
path: root/kernel/rcu/rcuscale.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-03-25 16:39:01 -0700
committerPaul E. McKenney <paulmck@kernel.org>2022-04-20 16:53:19 -0700
commit4df002d908796c1ff87b985af1d31a0e36e6c66f (patch)
tree7db00121a446072dcab18501497d5a6934f753df /kernel/rcu/rcuscale.c
parentdec86781a54f4a527386a0b86b22e99e2ac67a09 (diff)
rcuscale: Allow rcuscale without RCU Tasks
Currently, a CONFIG_PREEMPT_NONE=y kernel substitutes normal RCU for RCU Tasks. Unless that kernel builds rcuscale, whether built-in or as a module, in which case RCU Tasks is (unnecessarily) built. 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. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/rcuscale.c')
-rw-r--r--kernel/rcu/rcuscale.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 5e4f1f83d38e..311dbcb064ed 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -268,6 +268,8 @@ static struct rcu_scale_ops srcud_ops = {
.name = "srcud"
};
+#ifdef CONFIG_TASKS_RCU
+
/*
* Definitions for RCU-tasks scalability testing.
*/
@@ -295,6 +297,14 @@ static struct rcu_scale_ops tasks_ops = {
.name = "tasks"
};
+#define TASKS_OPS &tasks_ops,
+
+#else // #ifdef CONFIG_TASKS_RCU
+
+#define TASKS_OPS
+
+#endif // #else // #ifdef CONFIG_TASKS_RCU
+
/*
* Definitions for RCU-tasks-trace scalability testing.
*/
@@ -797,7 +807,7 @@ rcu_scale_init(void)
long i;
int firsterr = 0;
static struct rcu_scale_ops *scale_ops[] = {
- &rcu_ops, &srcu_ops, &srcud_ops, &tasks_ops, &tasks_tracing_ops
+ &rcu_ops, &srcu_ops, &srcud_ops, TASKS_OPS &tasks_tracing_ops
};
if (!torture_init_begin(scale_type, verbose))