* [PATCH v3 0/1] rcutorture: Avoid soft lockup during cpu stall @ 2021-11-10 14:37 Wander Lairson Costa 2021-11-10 14:37 ` [PATCH v3 1/1] " Wander Lairson Costa 0 siblings, 1 reply; 3+ messages in thread From: Wander Lairson Costa @ 2021-11-10 14:37 UTC (permalink / raw) To: Davidlohr Bueso, Paul E. McKenney, Josh Triplett, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes, open list:TORTURE-TEST MODULES, open list:READ-COPY UPDATE (RCU) Cc: Wander Lairson Costa This version fixes the include in the beggining of the source file. The patch applies cleanly to git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git Wander Lairson Costa (1): rcutorture: Avoid soft lockup during cpu stall kernel/rcu/rcutorture.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.27.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3 1/1] rcutorture: Avoid soft lockup during cpu stall 2021-11-10 14:37 [PATCH v3 0/1] rcutorture: Avoid soft lockup during cpu stall Wander Lairson Costa @ 2021-11-10 14:37 ` Wander Lairson Costa 2021-11-11 0:09 ` Paul E. McKenney 0 siblings, 1 reply; 3+ messages in thread From: Wander Lairson Costa @ 2021-11-10 14:37 UTC (permalink / raw) To: Davidlohr Bueso, Paul E. McKenney, Josh Triplett, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes, open list:TORTURE-TEST MODULES, open list:READ-COPY UPDATE (RCU) Cc: Wander Lairson Costa If we use the module stall_cpu option, we may get a soft lockup warning in case we also don't pass the stall_cpu_block option. Introduce the stall_no_softlockup option to avoid a soft lockup on cpu stall even if we don't use the stall_cpu_block option. Signed-off-by: Wander Lairson Costa <wander@redhat.com> --- kernel/rcu/rcutorture.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 36a273589a35..bc854f935548 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -46,6 +46,7 @@ #include <linux/oom.h> #include <linux/tick.h> #include <linux/rcupdate_trace.h> +#include <linux/nmi.h> #include "rcu.h" @@ -112,6 +113,8 @@ torture_param(int, shutdown_secs, 0, "Shutdown time (s), <= zero to disable."); torture_param(int, stall_cpu, 0, "Stall duration (s), zero to disable."); torture_param(int, stall_cpu_holdoff, 10, "Time to wait before starting stall (s)."); +torture_param(bool, stall_no_softlockup, false, + "Avoid softlockup warning during cpu stall."); torture_param(int, stall_cpu_irqsoff, 0, "Disable interrupts while stalling."); torture_param(int, stall_cpu_block, 0, "Sleep while stalling."); torture_param(int, stall_gp_kthread, 0, @@ -2085,6 +2088,8 @@ static int rcu_torture_stall(void *args) #else schedule_timeout_uninterruptible(HZ); #endif + } else if (stall_no_softlockup) { + touch_softlockup_watchdog(); } if (stall_cpu_irqsoff) local_irq_enable(); -- 2.27.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 1/1] rcutorture: Avoid soft lockup during cpu stall 2021-11-10 14:37 ` [PATCH v3 1/1] " Wander Lairson Costa @ 2021-11-11 0:09 ` Paul E. McKenney 0 siblings, 0 replies; 3+ messages in thread From: Paul E. McKenney @ 2021-11-11 0:09 UTC (permalink / raw) To: Wander Lairson Costa Cc: Davidlohr Bueso, Josh Triplett, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes, open list:TORTURE-TEST MODULES, open list:READ-COPY UPDATE (RCU) On Wed, Nov 10, 2021 at 11:37:45AM -0300, Wander Lairson Costa wrote: > If we use the module stall_cpu option, we may get a soft lockup warning > in case we also don't pass the stall_cpu_block option. > > Introduce the stall_no_softlockup option to avoid a soft lockup on > cpu stall even if we don't use the stall_cpu_block option. > > Signed-off-by: Wander Lairson Costa <wander@redhat.com> Queued for review and further testing, thank you! Thanx, Paul > --- > kernel/rcu/rcutorture.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c > index 36a273589a35..bc854f935548 100644 > --- a/kernel/rcu/rcutorture.c > +++ b/kernel/rcu/rcutorture.c > @@ -46,6 +46,7 @@ > #include <linux/oom.h> > #include <linux/tick.h> > #include <linux/rcupdate_trace.h> > +#include <linux/nmi.h> > > #include "rcu.h" > > @@ -112,6 +113,8 @@ torture_param(int, shutdown_secs, 0, "Shutdown time (s), <= zero to disable."); > torture_param(int, stall_cpu, 0, "Stall duration (s), zero to disable."); > torture_param(int, stall_cpu_holdoff, 10, > "Time to wait before starting stall (s)."); > +torture_param(bool, stall_no_softlockup, false, > + "Avoid softlockup warning during cpu stall."); > torture_param(int, stall_cpu_irqsoff, 0, "Disable interrupts while stalling."); > torture_param(int, stall_cpu_block, 0, "Sleep while stalling."); > torture_param(int, stall_gp_kthread, 0, > @@ -2085,6 +2088,8 @@ static int rcu_torture_stall(void *args) > #else > schedule_timeout_uninterruptible(HZ); > #endif > + } else if (stall_no_softlockup) { > + touch_softlockup_watchdog(); > } > if (stall_cpu_irqsoff) > local_irq_enable(); > -- > 2.27.0 > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-11 0:09 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-10 14:37 [PATCH v3 0/1] rcutorture: Avoid soft lockup during cpu stall Wander Lairson Costa 2021-11-10 14:37 ` [PATCH v3 1/1] " Wander Lairson Costa 2021-11-11 0:09 ` Paul E. McKenney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome