public inbox for [email protected]
 help / color / mirror / Atom feed
* Re: [bug report] system will hung up when cpu hot plug
       [not found] <CAGS2=YoVrLmiFADaLJJCerGdyRZJk2qKXhQL1qpH61YpCMqJFw@mail.gmail.com>
@ 2023-06-21 13:08 ` Ming Lei
  0 siblings, 0 replies; only message in thread
From: Ming Lei @ 2023-06-21 13:08 UTC (permalink / raw)
  To: Guangwu Zhang; +Cc: linux-block, Jeff Moyer, io-uring, John Meneghini

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-21 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAGS2=YoVrLmiFADaLJJCerGdyRZJk2qKXhQL1qpH61YpCMqJFw@mail.gmail.com>
2023-06-21 13:08 ` [bug report] system will hung up when cpu hot plug Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox