* [PATCH RFC] rcu: torture: shorten the time between forward-progress tests
@ 2023-05-02 15:06 zhouzhouyi
2023-08-23 21:15 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: zhouzhouyi @ 2023-05-02 15:06 UTC (permalink / raw)
To: paulmck, rcu, linuxppc-dev, linux-kernel, lance; +Cc: Zhouyi Zhou
From: Zhouyi Zhou <zhouzhouyi@gmail.com>
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.
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
---
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(+)
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
index ce0694fd9b92..982582bff041 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
@@ -1,2 +1,3 @@
rcutorture.torture_type=srcu
rcutorture.fwd_progress=3
+rcutorture.fwd_progress_holdoff=1
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
index 2db39f298d18..18f5d7361d8a 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
@@ -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
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
index c70b5db6c2ae..b86bc7df7603 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
@@ -1,2 +1,3 @@
rcutorture.torture_type=tasks-tracing
rcutorture.fwd_progress=2
+rcutorture.fwd_progress_holdoff=1
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
index dd914fa8f690..933302f885df 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
@@ -1 +1,2 @@
rcutorture.fwd_progress=2
+rcutorture.fwd_progress_holdoff=1
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
index dd914fa8f690..933302f885df 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
+++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
@@ -1 +1,2 @@
rcutorture.fwd_progress=2
+rcutorture.fwd_progress_holdoff=1
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] rcu: torture: shorten the time between forward-progress tests
2023-05-02 15:06 [PATCH RFC] rcu: torture: shorten the time between forward-progress tests zhouzhouyi
@ 2023-08-23 21:15 ` Paul E. McKenney
2023-08-24 2:29 ` Zhouyi Zhou
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2023-08-23 21:15 UTC (permalink / raw)
To: zhouzhouyi; +Cc: rcu, lance, linuxppc-dev, linux-kernel
On Tue, May 02, 2023 at 11:06:02PM +0800, zhouzhouyi@gmail.com wrote:
> From: Zhouyi Zhou <zhouzhouyi@gmail.com>
>
> 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.
>
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
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
> ---
> 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(+)
>
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
> index ce0694fd9b92..982582bff041 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
> @@ -1,2 +1,3 @@
> rcutorture.torture_type=srcu
> rcutorture.fwd_progress=3
> +rcutorture.fwd_progress_holdoff=1
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
> index 2db39f298d18..18f5d7361d8a 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
> @@ -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
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
> index c70b5db6c2ae..b86bc7df7603 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
> @@ -1,2 +1,3 @@
> rcutorture.torture_type=tasks-tracing
> rcutorture.fwd_progress=2
> +rcutorture.fwd_progress_holdoff=1
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
> index dd914fa8f690..933302f885df 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
> @@ -1 +1,2 @@
> rcutorture.fwd_progress=2
> +rcutorture.fwd_progress_holdoff=1
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
> index dd914fa8f690..933302f885df 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
> @@ -1 +1,2 @@
> rcutorture.fwd_progress=2
> +rcutorture.fwd_progress_holdoff=1
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] rcu: torture: shorten the time between forward-progress tests
2023-08-23 21:15 ` Paul E. McKenney
@ 2023-08-24 2:29 ` Zhouyi Zhou
0 siblings, 0 replies; 3+ messages in thread
From: Zhouyi Zhou @ 2023-08-24 2:29 UTC (permalink / raw)
To: paulmck; +Cc: rcu, lance, linuxppc-dev, linux-kernel
On Thu, Aug 24, 2023 at 5:15 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> On Tue, May 02, 2023 at 11:06:02PM +0800, zhouzhouyi@gmail.com wrote:
> > From: Zhouyi Zhou <zhouzhouyi@gmail.com>
> >
> > 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.
> >
> > Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
>
> 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 ;-)
>
> 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
>
> Or am I missing the point of this change?
>
> Thanx, Paul
>
> > ---
> > 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(+)
> >
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
> > index ce0694fd9b92..982582bff041 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N.boot
> > @@ -1,2 +1,3 @@
> > rcutorture.torture_type=srcu
> > rcutorture.fwd_progress=3
> > +rcutorture.fwd_progress_holdoff=1
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
> > index 2db39f298d18..18f5d7361d8a 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
> > @@ -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
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
> > index c70b5db6c2ae..b86bc7df7603 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02.boot
> > @@ -1,2 +1,3 @@
> > rcutorture.torture_type=tasks-tracing
> > rcutorture.fwd_progress=2
> > +rcutorture.fwd_progress_holdoff=1
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
> > index dd914fa8f690..933302f885df 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02.boot
> > @@ -1 +1,2 @@
> > rcutorture.fwd_progress=2
> > +rcutorture.fwd_progress_holdoff=1
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot b/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
> > index dd914fa8f690..933302f885df 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE10.boot
> > @@ -1 +1,2 @@
> > rcutorture.fwd_progress=2
> > +rcutorture.fwd_progress_holdoff=1
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-24 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02 15:06 [PATCH RFC] rcu: torture: shorten the time between forward-progress tests zhouzhouyi
2023-08-23 21:15 ` Paul E. McKenney
2023-08-24 2:29 ` Zhouyi Zhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).