public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ming Lei <[email protected]>
To: Guangwu Zhang <[email protected]>
Cc: [email protected], Jeff Moyer <[email protected]>,
	[email protected], John Meneghini <[email protected]>
Subject: Re: [bug report] system will hung up when cpu hot plug
Date: Wed, 21 Jun 2023 21:08:36 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGS2=YoVrLmiFADaLJJCerGdyRZJk2qKXhQL1qpH61YpCMqJFw@mail.gmail.com>

On Wed, Jun 21, 2023 at 12:11:24PM +0800, Guangwu Zhang wrote:
> Hello
> 
> We found this kernel issue with latest linux-block/for-next, let me
> know if you need more info/testing, thanks
> 
> kernel repo:
>     Merge branch 'for-6.5/block' into for-next
>     * for-6.5/block:
>       reiserfs: fix blkdev_put() warning from release_journal_dev()
> 
> test steps:
> 1. run cpu online/offline in background
> 2. run fio with ioengine=io_uring_cmd
> 

Hi Guangwu,

I have looked at dmesg log and it happens in case of io scheduler & pt request.

Please try the following patch, and the issue should be introduced from
d97217e7f024 ("blk-mq: don't queue plugged passthrough requests into scheduler").


diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4c02c28b4835..0433fb43223b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2750,7 +2750,12 @@ static void blk_mq_dispatch_plug_list(struct blk_plug *plug, bool from_sched)

        percpu_ref_get(&this_hctx->queue->q_usage_counter);
        /* passthrough requests should never be issued to the I/O scheduler */
-       if (this_hctx->queue->elevator && !is_passthrough) {
+       if (is_passthrough) {
+               spin_lock(&this_hctx->lock);
+               list_splice_tail_init(&list, &this_hctx->dispatch);
+               spin_unlock(&this_hctx->lock);
+               blk_mq_run_hw_queue(this_hctx, from_sched);
+       } if (this_hctx->queue->elevator) {
                this_hctx->queue->elevator->type->ops.insert_requests(this_hctx,
                                &list, 0);
                blk_mq_run_hw_queue(this_hctx, from_sched);


Thanks, 
Ming


           reply	other threads:[~2023-06-21 13:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAGS2=YoVrLmiFADaLJJCerGdyRZJk2qKXhQL1qpH61YpCMqJFw@mail.gmail.com>]

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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