rcu: torture: shorten the time between forward-progress tests
Subsystems (3)
RFC PATCH 1/1 rcu: torture: shorten the time between forward-progress tests
From: Zhouyi Zhou <[email protected]>
Currently, default time between rcu torture forward-progress tests is 60HZ, Under this configuration, false positive caused by __stack_chk_fail [1] is difficult to reproduce (needs average 5*420 seconds for SRCU-P), which means one has to invoke [2] 5 times in average to make [1] appear.
With time between rcu torture forward-progress tests be 1 HZ, above phenomenon will be reproduced within 3 minutes, which means we can reproduce [1] everytime we invoke [2].
Although [1] is a false positive, this change will make possible future true bugs easier to be discovered.
[1] Link: https://lore.kernel.org/lkml/CAABZP2yS5=ZUwEZQ7iHkV0wDm_HgO8K-TeAhyJrZhavzKDa44Q@mail.gmail.com/T/
[2] tools/testing/selftests/rcutorture/bin/torture.sh
Tested in PPC VM of Opensource Lab of Oregon State Univerisity.
--- tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot | 1 + 5 files changed, 5 insertions(+)
tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot +1 -0
@@ -1,2 +1,3 @@ rcutorture.torture_type=srcu rcutorture.fwd_progress=3 +rcutorture.fwd_progress_holdoff=1
tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot +1 -0
@@ -1,4 +1,5 @@ rcutorture.torture_type=srcud rcupdate.rcu_self_test=1 rcutorture.fwd_progress=3 +rcutorture.fwd_progress_holdoff=1 srcutree.big_cpu_lim=5
tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot +1 -0
@@ -1,2 +1,3 @@ rcutorture.torture_type=tasks-tracing rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1
tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot +1 -0
@@ -1 +1,2 @@ rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1
tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot +1 -0
@@ -1 +1,2 @@ rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1
Signature · 1 line
2.34.1
Paul E. McKenney
maintainerQuoted 14 lines · On Tue, May 02, 2023 at 11:06:02PM +0800, [email protected] wrote:
From: Zhouyi Zhou <[email protected]>
Currently, default time between rcu torture forward-progress tests is 60HZ, Under this configuration, false positive caused by
__stack_chk_fail[1] is difficult to reproduce (needs average 5*420 seconds for SRCU-P), which means one has to invoke [2] 5 times in average to make [1] appear.With time between rcu torture forward-progress tests be 1 HZ, above phenomenon will be reproduced within 3 minutes, which means we can reproduce [1] everytime we invoke [2].
Although [1] is a false positive, this change will make possible future true bugs easier to be discovered.
Quoted 6 lines
[1] Link: https://lore.kernel.org/lkml/CAABZP2yS5=ZUwEZQ7iHkV0wDm_HgO8K-TeAhyJrZhavzKDa44Q@mail.gmail.com/T/
[2]tools/testing/selftests/rcutorture/bin/torture.shTested in PPC VM of Opensource Lab of Oregon State Univerisity.
Signed-off-by Zhouyi Zhou <[email protected]>
Please accept my apologies for being ridiculously slow to reply!
In recent -rcu, module parameters such as this one that simply set a value can be overridden on the command line. So you could get the effect (again, in recent kernels) in your testing by adding:
--bootargs "rcutorture.fwd_progress_holdoff=1"
The reason that I am reluctant to accept this patch is that we sometimes have trouble with this forward-progress testing exhausting memory, and making in happen could therefore cause trouble with generic rcutorture testing.
Or am I missing the point of this change?
Thanx, Paul
Quoted 51 lines
--- tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot | 1 + 5 files changed, 5 insertions(+)tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot +1
-0@@ -1,2 +1,3 @@ rcutorture.torture_type=srcu rcutorture.fwd_progress=3 +rcutorture.fwd_progress_holdoff=1tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot +1
-0@@ -1,4 +1,5 @@ rcutorture.torture_type=srcud rcupdate.rcu_self_test=1 rcutorture.fwd_progress=3 +rcutorture.fwd_progress_holdoff=1 srcutree.big_cpu_lim=5tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot +1
-0@@ -1,2 +1,3 @@ rcutorture.torture_type=tasks-tracing rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot +1
-0@@ -1 +1,2 @@ rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot +1
-0@@ -1 +1,2 @@ rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1Signature · 1 line
2.34.1
Quoted 16 lines · Paul E. McKenney
Quoted 14 lines · On Tue, May 02, 2023 at 11:06:02PM +0800, [email protected] wrote:
From: Zhouyi Zhou <[email protected]>
Currently, default time between rcu torture forward-progress tests is 60HZ, Under this configuration, false positive caused by
__stack_chk_fail[1] is difficult to reproduce (needs average 5*420 seconds for SRCU-P), which means one has to invoke [2] 5 times in average to make [1] appear.With time between rcu torture forward-progress tests be 1 HZ, above phenomenon will be reproduced within 3 minutes, which means we can reproduce [1] everytime we invoke [2].
Although [1] is a false positive, this change will make possible future true bugs easier to be discovered.
Quoted 8 lines
Quoted 6 lines
[1] Link: https://lore.kernel.org/lkml/CAABZP2yS5=ZUwEZQ7iHkV0wDm_HgO8K-TeAhyJrZhavzKDa44Q@mail.gmail.com/T/
[2]tools/testing/selftests/rcutorture/bin/torture.shTested in PPC VM of Opensource Lab of Oregon State Univerisity.
Signed-off-by Zhouyi Zhou <[email protected]>Please accept my apologies for being ridiculously slow to reply!
Never mind. I have made a lot of self improvement during the study of RCU and RCU torture and your book ;-)
Quoted 11 lines
In recent -rcu, module parameters such as this one that simply set a value can be overridden on the command line. So you could get the effect (again, in recent kernels) in your testing by adding:
--bootargs "rcutorture.fwd_progress_holdoff=1"
The reason that I am reluctant to accept this patch is that we sometimes have trouble with this forward-progress testing exhausting memory, and making in happen could therefore cause trouble with generic rcutorture testing.
Agree, false positives can disrupt our judgement in many cases.
Thanx Zhouyi
Quoted 56 lines
Or am I missing the point of this change?
Thanx, Paul
Quoted 51 lines
--- tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot | 1 + 5 files changed, 5 insertions(+)tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot +1
-0@@ -1,2 +1,3 @@ rcutorture.torture_type=srcu rcutorture.fwd_progress=3 +rcutorture.fwd_progress_holdoff=1tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot +1
-0@@ -1,4 +1,5 @@ rcutorture.torture_type=srcud rcupdate.rcu_self_test=1 rcutorture.fwd_progress=3 +rcutorture.fwd_progress_holdoff=1 srcutree.big_cpu_lim=5tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot +1
-0@@ -1,2 +1,3 @@ rcutorture.torture_type=tasks-tracing rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot +1
-0@@ -1 +1,2 @@ rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot +1
-1@@ -1 +1,2 @@ rcutorture.fwd_progress=2 +rcutorture.fwd_progress_holdoff=1 --2.34.1