From: Zqiang <qiang1.zhang@intel.com>
To: paulmck@kernel.org, frederic@kernel.org, joel@joelfernandes.org
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] rcutorture: Convert schedule_timeout_uninterruptible() to mdelay() in rcu_torture_stall()
Date: Mon, 20 Mar 2023 11:24:22 +0800 [thread overview]
Message-ID: <20230320032422.4010801-1-qiang1.zhang@intel.com> (raw)
For kernels built with enable PREEMPT_NONE and CONFIG_DEBUG_ATOMIC_SLEEP,
running the RCU stall tests.
runqemu kvm slirp nographic qemuparams="-m 1024 -smp 4"
bootparams="nokaslr console=ttyS0 rcutorture.stall_cpu=30
rcutorture.stall_no_softlockup=1 rcutorture.stall_cpu_irqsoff=1
rcutorture.stall_cpu_block=1" -d
[ 10.841071] rcu-torture: rcu_torture_stall begin CPU stall
[ 10.841073] rcu_torture_stall start on CPU 3.
[ 10.841077] BUG: scheduling while atomic: rcu_torture_sta/66/0x0000000
....
[ 10.841108] Call Trace:
[ 10.841110] <TASK>
[ 10.841112] dump_stack_lvl+0x64/0xb0
[ 10.841118] dump_stack+0x10/0x20
[ 10.841121] __schedule_bug+0x8b/0xb0
[ 10.841126] __schedule+0x2172/0x2940
[ 10.841157] schedule+0x9b/0x150
[ 10.841160] schedule_timeout+0x2e8/0x4f0
[ 10.841192] schedule_timeout_uninterruptible+0x47/0x50
[ 10.841195] rcu_torture_stall+0x2e8/0x300
[ 10.841199] kthread+0x175/0x1a0
[ 10.841206] ret_from_fork+0x2c/0x50
The above calltrace occurs in the local_irq_disable/enable() critical
section call schedule_timeout(), and invoke schedule_timeout() also
implies a quiescent state, of course it also fails to trigger RCU stall,
this commit therefore use mdelay() instead of schedule_timeout() to
trigger RCU stall.
Suggested-by: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
kernel/rcu/rcutorture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index d06c2da04c34..a08a72bef5f1 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2472,7 +2472,7 @@ static int rcu_torture_stall(void *args)
#ifdef CONFIG_PREEMPTION
preempt_schedule();
#else
- schedule_timeout_uninterruptible(HZ);
+ mdelay(jiffies_to_msecs(HZ));
#endif
} else if (stall_no_softlockup) {
touch_softlockup_watchdog();
--
2.25.1
next reply other threads:[~2023-03-20 3:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 3:24 Zqiang [this message]
2023-03-20 8:48 ` Zhuo, Qiuxu
2023-03-20 20:18 ` Paul E. McKenney
2023-03-20 23:05 ` Zhang, Qiang1
2023-03-20 23:35 ` Paul E. McKenney
2023-03-21 0:35 ` Zhang, Qiang1
2023-03-21 12:27 ` Zhuo, Qiuxu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230320032422.4010801-1-qiang1.zhang@intel.com \
--to=qiang1.zhang@intel.com \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®