]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rcuscale: Allow rcuscale without RCU Tasks
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 25 Mar 2022 23:39:01 +0000 (16:39 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 20 Apr 2022 23:53:19 +0000 (16:53 -0700)
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>
kernel/rcu/Kconfig.debug
kernel/rcu/rcuscale.c
tools/testing/selftests/rcutorture/configs/rcuscale/CFcommon
tools/testing/selftests/rcutorture/configs/rcuscale/TREE

index dceaa3e754e5f01cb4d2468f273500834bd7b3e1..71e73fceff874fbe073768bf16eda5e9adea1153 100644 (file)
@@ -28,7 +28,6 @@ config RCU_SCALE_TEST
        depends on DEBUG_KERNEL
        select TORTURE_TEST
        select SRCU
-       select TASKS_RCU
        select TASKS_RUDE_RCU
        select TASKS_TRACE_RCU
        default n
index 5e4f1f83d38e72663d3760f46d5c0084cd3bb6c0..311dbcb064edf54420c7d5084700a6fb1e123a5f 100644 (file)
@@ -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))
index 90942bb5bebc505940461a38e32cfdb0122c295f..2ed3b46a9c37818b5276de8fb8bc601895108654 100644 (file)
@@ -1,5 +1,5 @@
 CONFIG_RCU_SCALE_TEST=y
 CONFIG_PRINTK_TIME=y
 CONFIG_TASKS_RCU_GENERIC=y
-CONFIG_TASKS_RCU=y
-CONFIG_TASKS_TRACE_RCU=y
+CONFIG_FORCE_TASKS_RCU=y
+#CHECK#CONFIG_TASKS_RCU=y
index f110d9ffbe4cb1e41db98b25cca92fc1d336cf17..b10706fd03a45089993133eb3ec2aafc04128c28 100644 (file)
@@ -16,3 +16,5 @@ CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
 CONFIG_RCU_EXPERT=y
 CONFIG_RCU_TRACE=y
+CONFIG_KPROBES=n
+CONFIG_FTRACE=n