From: Bart Van Assche <bvanassche@acm.org>
To: yangerkun <yangerkun@huawei.com>,
ming.lei@redhat.com, damien.lemoal@wdc.com, axboe@kernel.dk,
miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com
Cc: linux-block@vger.kernel.org, linux-mtd@lists.infradead.org,
yi.zhang@huawei.com, yebin10@huawei.com, houtao1@huawei.com
Subject: Re: [QUESTION] blk_mq_freeze_queue in elevator_init_mq
Date: Tue, 16 Nov 2021 20:11:39 -0800 [thread overview]
Message-ID: <59cb2cfd-3890-9fb4-9e77-a4b084d088e9@acm.org> (raw)
In-Reply-To: <d9113bf8-4654-cb04-f79c-38e11493cb2c@huawei.com>
On 11/16/21 19:37, yangerkun wrote:
> This commit add blk_mq_freeze_queue in elevator_init_mq which try to
> make sure no in-flight request while we go through blk_mq_init_sched.
> But does there any drivers can leave IO alive while we go through
> elevator_init_mq? And if no, maybe we can just remove this logical to
> fix the regression...
Does this untested patch help? Please note that I'm not recommending to
integrate this patch in the upstream kernel but if it helps it can be a
building block of a solution.
Thanks,
Bart.
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 3ab34c4f20da..b85dcb72a579 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -167,6 +167,7 @@ void blk_freeze_queue_start(struct request_queue *q)
mutex_unlock(&q->mq_freeze_lock);
if (queue_is_mq(q))
blk_mq_run_hw_queues(q, false);
+ synchronize_rcu_expedited();
} else {
mutex_unlock(&q->mq_freeze_lock);
}
next prev parent reply other threads:[~2021-11-17 4:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 3:37 [QUESTION] blk_mq_freeze_queue in elevator_init_mq yangerkun
2021-11-17 4:11 ` Bart Van Assche [this message]
2021-11-17 8:39 ` yangerkun
2021-11-17 8:06 ` Ming Lei
2021-11-17 8:37 ` yangerkun
2021-11-17 9:00 ` yangerkun
2021-11-17 10:19 ` Ming Lei
2021-11-18 13:12 ` yangerkun
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=59cb2cfd-3890-9fb4-9e77-a4b084d088e9@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=houtao1@huawei.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=ming.lei@redhat.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=yangerkun@huawei.com \
--cc=yebin10@huawei.com \
--cc=yi.zhang@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