From: Keith Busch <kbusch@kernel.org>
To: Yu Kuai <yukuai@fnnas.com>
Cc: Christoph Hellwig <hch@lst.de>,
axboe@kernel.dk, sagi@grimberg.me, sven@kernel.org, j@jannau.net,
linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
tj@kernel.org, nilay@linux.ibm.com, ming.lei@redhat.com,
neal@gompa.dev, asahi@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/4] nvme-apple: move blk_mq_update_nr_hw_queues after nvme_unfreeze
Date: Tue, 10 Feb 2026 08:09:08 -0700 [thread overview]
Message-ID: <aYtKFNm-wRKn6l66@kbusch-mbp> (raw)
In-Reply-To: <e3e7d95b-2712-4365-922d-731449e7193a@fnnas.com>
On Tue, Feb 10, 2026 at 02:47:00PM +0800, Yu Kuai wrote:
> 在 2026/2/9 23:35, Keith Busch 写道:
> > We've left it frozen on purpose, though. The idea was to prevent new IO
> > from entering a hw context that's no longer backed by a hardware
> > resourse. Unfreezing prior opens that window up again. Maybe it's not a
> > big deal; I don't often encounter scenarios where the queue count
> > changes after a reset.
>
> Do you think if there are new IO coming between nvme_unfreeze() and
> blk_mq_update_nr_hw_queues(), will be any race problems? If so, will it
> be helpful to move nvme_unquiesce_io_queues() after
> blk_mq_update_nr_hw_queues() so that new IO won't be issued to driver
> during the race window.
If you leave the queue quiesced, pending IO will form requests that are
entered and waiting in the block layer. You can't freeze a queue with
entered requests.
We unquiesce first to flush any pending IO that had entered during the
prior reset. It's not the best way to handle this situation. It would be
smarter to steal the bio's from all the entered requests, then end those
requests, then resubmit the bios after the hw queues are initialized. We
don't do that because no one's really complained, probably because the
queue counts don't usually change after a reset. But if the queue count
did change, we'd potentially see unexpected IO errors with the current
way we're handling resets.
next prev parent reply other threads:[~2026-02-10 15:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 8:29 [PATCH 0/4] blk-mq/nvme: fix debugfs creation with frozen queue Yu Kuai
2026-02-09 8:29 ` [PATCH 1/4] nvme-rdma: move blk_mq_update_nr_hw_queues after nvme_unfreeze Yu Kuai
2026-02-09 14:57 ` Christoph Hellwig
2026-02-11 7:21 ` Nilay Shroff
2026-02-09 8:29 ` [PATCH 2/4] nvme-tcp: " Yu Kuai
2026-02-09 14:57 ` Christoph Hellwig
2026-02-11 7:22 ` Nilay Shroff
2026-02-09 8:29 ` [PATCH 3/4] nvme-apple: " Yu Kuai
2026-02-09 14:58 ` Christoph Hellwig
2026-02-09 15:35 ` Keith Busch
2026-02-10 6:47 ` Yu Kuai
2026-02-10 15:09 ` Keith Busch [this message]
2026-02-10 15:41 ` Christoph Hellwig
2026-02-10 16:01 ` Keith Busch
2026-02-10 16:28 ` Daniel Wagner
2026-02-11 1:57 ` Yu Kuai
2026-02-11 12:57 ` Keith Busch
2026-02-10 8:10 ` Nilay Shroff
2026-02-10 15:12 ` Keith Busch
2026-02-11 7:23 ` Nilay Shroff
2026-02-09 8:29 ` [PATCH 4/4] blk-mq: use blk_queue_enter/exit to protect debugfs file creation Yu Kuai
2026-02-09 14:59 ` Christoph Hellwig
2026-02-09 16:40 ` Bart Van Assche
2026-02-09 17:33 ` Keith Busch
2026-02-09 17:51 ` Bart Van Assche
2026-02-10 6:59 ` Yu Kuai
2026-02-10 15:41 ` Christoph Hellwig
2026-02-11 7:20 ` Nilay Shroff
2026-02-11 8:06 ` Yu Kuai
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=aYtKFNm-wRKn6l66@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=asahi@lists.linux.dev \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=j@jannau.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ming.lei@redhat.com \
--cc=neal@gompa.dev \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
--cc=sven@kernel.org \
--cc=tj@kernel.org \
--cc=yukuai@fnnas.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