From: Bart Van Assche <bvanassche@acm.org>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
Jens Axboe <axboe@kernel.dk>,
Zhen Lei <thunder.leizhen@huawei.com>,
linux-block <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block/mq-deadline: Speed up the dispatch of low-priority requests
Date: Mon, 30 Aug 2021 10:14:11 -0700 [thread overview]
Message-ID: <cb651839-bc72-5b85-c531-af28b84dcbaf@acm.org> (raw)
In-Reply-To: <DM6PR04MB70817A17F89A5654A46F3729E7CB9@DM6PR04MB7081.namprd04.prod.outlook.com>
On 8/29/21 8:07 PM, Damien Le Moal wrote:
> On 2021/08/30 11:40, Bart Van Assche wrote:
>> On 8/29/21 16:02, Damien Le Moal wrote:
>>> On 2021/08/27 23:34, Bart Van Assche wrote:
>>>> On 8/26/21 9:49 PM, Damien Le Moal wrote:
>>>>> So the mq-deadline priority patch reduces performance by nearly half at high QD.
>>>>> (*) Note: in all cases using the mq-deadline scheduler, for the first run at
>>>>> QD=1, I get this splat 100% of the time.
>>>>>
>>>>> [ 95.173889] watchdog: BUG: soft lockup - CPU#0 stuck for 26s! [kworker/0:1H:757]
>>>>> [ 95.292994] CPU: 0 PID: 757 Comm: kworker/0:1H Not tainted 5.14.0-rc7+ #1334
>>>>> [ 95.307504] Workqueue: kblockd blk_mq_run_work_fn
>>>>> [ 95.312243] RIP: 0010:_raw_spin_unlock_irqrestore+0x35/0x40
>>>>> [ 95.415904] Call Trace:
>>>>> [ 95.418373] try_to_wake_up+0x268/0x7c0
>>>>> [ 95.422238] blk_update_request+0x25b/0x420
>>>>> [ 95.426452] blk_mq_end_request+0x1c/0x120
>>>>> [ 95.430576] null_handle_cmd+0x12d/0x270 [null_blk]
>>>>> [ 95.435485] blk_mq_dispatch_rq_list+0x13c/0x7f0
>>>>> [ 95.443826] __blk_mq_do_dispatch_sched+0xb5/0x2f0
>>>>> [ 95.448653] __blk_mq_sched_dispatch_requests+0xf4/0x140
>>>>> [ 95.453998] blk_mq_sched_dispatch_requests+0x30/0x60
>>>>> [ 95.459083] __blk_mq_run_hw_queue+0x49/0x90
>>>>> [ 95.463377] process_one_work+0x26c/0x570
>>>>> [ 95.467421] worker_thread+0x55/0x3c0
>>>>> [ 95.475313] kthread+0x140/0x160
>>>>> [ 95.482774] ret_from_fork+0x1f/0x30
>>>>
>>>> I don't see any function names in the above call stack that refer to the
>>>> mq-deadline scheduler? Did I perhaps overlook something? Anyway, if you can
>>>> tell me how to reproduce this (kernel commit + kernel config) I will take a
>>>> look.
>>>
>>> Indeed, the stack trace does not show any mq-deadline function. But the
>>> workqueue is stuck on _raw_spin_unlock_irqrestore() in the blk_mq_run_work_fn()
>>> function. I suspect that the spinlock is dd->lock, so the CPU may be stuck on
>>> entry to mq-deadline dispatch or finish request methods. Not entirely sure.
>>>
>>> I got this splat with 5.4.0-rc7 (Linus tag patch) with the attached config.
>>
>> Hi Damien,
>>
>> Thank you for having shared the kernel configuration used in your test.
>> So far I have not yet been able to reproduce the above call trace in a
>> VM. Could the above call trace have been triggered by the mpt3sas driver
>> instead of the mq-deadline I/O scheduler?
>
> The above was triggered using nullblk with the test script you sent. I was not
> using drives on the HBA or AHCI when it happens. And I can reproduce this 100%
> of the time by running your script with QD=1.
Hi Damien,
I rebuilt kernel v5.14-rc7 (tag v5.14-rc7) after having run git clean -f -d -x
and reran my nullb iops test with the mq-deadline scheduler. No kernel complaints
appeared in the kernel log. Next I enabled lockdep (CONFIG_PROVE_LOCKING=y) and
reran the nullb iops test with mq-deadline as scheduler. Again zero complaints
appeared in the kernel log. Next I ran a subset of the blktests test
(./check -q block). All tests passed and no complaints appeared in the kernel log.
Please help with root-causing this issue by rerunning the test on your setup after
having enabled lockdep.
Thanks,
Bart.
next prev parent reply other threads:[~2021-08-30 17:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 14:40 [PATCH] block/mq-deadline: Speed up the dispatch of low-priority requests Zhen Lei
2021-08-26 18:09 ` Bart Van Assche
2021-08-26 18:13 ` Jens Axboe
2021-08-26 18:45 ` Jens Axboe
2021-08-26 19:17 ` Bart Van Assche
2021-08-26 19:32 ` Jens Axboe
2021-08-26 23:49 ` Bart Van Assche
2021-08-26 23:51 ` Jens Axboe
2021-08-27 0:03 ` Bart Van Assche
2021-08-27 0:05 ` Jens Axboe
2021-08-27 0:58 ` Bart Van Assche
2021-08-27 2:48 ` Bart Van Assche
2021-08-27 3:13 ` Jens Axboe
2021-08-27 4:49 ` Damien Le Moal
2021-08-27 14:34 ` Bart Van Assche
2021-08-29 23:02 ` Damien Le Moal
2021-08-30 2:31 ` Keith Busch
2021-08-30 3:03 ` Damien Le Moal
2021-08-30 2:40 ` Bart Van Assche
2021-08-30 3:07 ` Damien Le Moal
2021-08-30 17:14 ` Bart Van Assche [this message]
2021-08-30 21:42 ` Damien Le Moal
2021-08-28 1:45 ` Leizhen (ThunderTown)
2021-08-28 2:19 ` Bart Van Assche
2021-08-28 2:42 ` Leizhen (ThunderTown)
2021-08-28 13:14 ` Leizhen (ThunderTown)
2021-08-28 1:59 ` Leizhen (ThunderTown)
2021-08-28 2:41 ` Bart Van Assche
2021-08-27 2:30 ` Damien Le Moal
2021-08-28 2:14 ` Leizhen (ThunderTown)
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=cb651839-bc72-5b85-c531-af28b84dcbaf@acm.org \
--to=bvanassche@acm.org \
--cc=Damien.LeMoal@wdc.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=thunder.leizhen@huawei.com \
/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