]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
refscale: Allow refscale without RCU Tasks
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 25 Mar 2022 21:39:54 +0000 (14: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 refscale, whether built-in or as a
module, in which case RCU Tasks is (unnecessarily) built in.  This both
increases kernel size and increases the complexity of certain tracing
operations.  This commit therefore decouples the presence of refscale
from the presence of RCU Tasks.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/Kconfig.debug
kernel/rcu/refscale.c
tools/testing/selftests/rcutorture/configs/refscale/CFcommon
tools/testing/selftests/rcutorture/configs/refscale/NOPREEMPT

index f4a4468cbf030405856c0498fb1a6786436991b8..454924e03ef3818550cfa3674aa3c1aa0541391f 100644 (file)
@@ -63,7 +63,6 @@ config RCU_REF_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 5489ff7f478e4372858693a56be3e95fd148e577..5079e47b3d1899a708a32ff1e1320c3c14d09c8a 100644 (file)
@@ -207,6 +207,8 @@ static struct ref_scale_ops srcu_ops = {
        .name           = "srcu"
 };
 
+#ifdef CONFIG_TASKS_RCU
+
 // Definitions for RCU Tasks ref scale testing: Empty read markers.
 // These definitions also work for RCU Rude readers.
 static void rcu_tasks_ref_scale_read_section(const int nloops)
@@ -232,6 +234,14 @@ static struct ref_scale_ops rcu_tasks_ops = {
        .name           = "rcu-tasks"
 };
 
+#define RCU_TASKS_OPS &rcu_tasks_ops,
+
+#else // #ifdef CONFIG_TASKS_RCU
+
+#define RCU_TASKS_OPS
+
+#endif // #else // #ifdef CONFIG_TASKS_RCU
+
 // Definitions for RCU Tasks Trace ref scale testing.
 static void rcu_trace_ref_scale_read_section(const int nloops)
 {
@@ -790,7 +800,7 @@ ref_scale_init(void)
        long i;
        int firsterr = 0;
        static struct ref_scale_ops *scale_ops[] = {
-               &rcu_ops, &srcu_ops, &rcu_trace_ops, &rcu_tasks_ops, &refcnt_ops, &rwlock_ops,
+               &rcu_ops, &srcu_ops, &rcu_trace_ops, RCU_TASKS_OPS &refcnt_ops, &rwlock_ops,
                &rwsem_ops, &lock_ops, &lock_irq_ops, &acqrel_ops, &clock_ops,
        };
 
index a98b58b54bb11d5fe2297bb6e96fd6bd39a2eb28..14fdafc576ce48dfec7d54f2698c18cd3250b5bf 100644 (file)
@@ -1,2 +1,4 @@
 CONFIG_RCU_REF_SCALE_TEST=y
 CONFIG_PRINTK_TIME=y
+CONFIG_FORCE_TASKS_RCU=y
+#CHECK#CONFIG_TASKS_RCU=y
index 7f06838a91e6103acbb362dfa6d9b22a1df7b1d0..ef2b501a697101e03e8f70146cbc1492e31d1b6d 100644 (file)
@@ -15,3 +15,5 @@ CONFIG_PROVE_LOCKING=n
 CONFIG_RCU_BOOST=n
 CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
 CONFIG_RCU_EXPERT=y
+CONFIG_KPROBES=n
+CONFIG_FTRACE=n