From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
Lai Yi <yi1.lai@linux.intel.com>
Subject: Re: [PATCH 5/5] block: don't verify IO lock for freeze/unfreeze in elevator_init_mq()
Date: Wed, 30 Oct 2024 22:59:31 +0800 [thread overview]
Message-ID: <ZyJJ09rbc21frA-D@fedora> (raw)
In-Reply-To: <20241030144652.GD32043@lst.de>
On Wed, Oct 30, 2024 at 03:46:52PM +0100, Christoph Hellwig wrote:
> On Wed, Oct 30, 2024 at 08:42:37PM +0800, Ming Lei wrote:
> > --- a/block/elevator.c
> > +++ b/block/elevator.c
> > @@ -598,13 +598,17 @@ void elevator_init_mq(struct request_queue *q)
> > * drain any dispatch activities originated from passthrough
> > * requests, then no need to quiesce queue which may add long boot
> > * latency, especially when lots of disks are involved.
> > + *
> > + * Disk isn't added yet, so verifying queue lock only manually.
> > */
> > - blk_mq_freeze_queue(q);
> > + blk_mq_freeze_queue_non_owner(q);
> > + blk_freeze_acquire_lock(q, true, false);
> > blk_mq_cancel_work_sync(q);
> >
> > err = blk_mq_init_sched(q, e);
> >
> > - blk_mq_unfreeze_queue(q);
> > + blk_unfreeze_release_lock(q, true, false);
> > + blk_mq_unfreeze_queue_non_owner(q);
>
> Why do we need to free at all from the add_disk case? The passthrough
> command should never hit the elevator, or am I missing something?
In theory the queue needn't to be frozen here, but both FS IO and PT req
share common blk-mq code, in which q->elevator is often referenced.
Thanks,
Ming
prev parent reply other threads:[~2024-10-30 14:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 12:42 [PATCH 0/5] block: freeze/unfreeze lockdep fixes Ming Lei
2024-10-30 12:42 ` [PATCH 1/5] block: remove blk_freeze_queue() Ming Lei
2024-10-30 14:43 ` Christoph Hellwig
2024-10-30 12:42 ` [PATCH 2/5] blk-mq: add non_owner variant of blk_mq_freeze_queue API Ming Lei
2024-10-30 12:42 ` [PATCH 3/5] rbd: convert to blk_mq_freeze_queue_non_owner Ming Lei
2024-10-30 14:44 ` Christoph Hellwig
2024-10-30 15:02 ` Ming Lei
2024-10-30 12:42 ` [PATCH 4/5] block: always verify unfreeze lock on the owner task Ming Lei
2024-10-30 14:46 ` Christoph Hellwig
2024-10-30 14:53 ` Ming Lei
2024-10-30 12:42 ` [PATCH 5/5] block: don't verify IO lock for freeze/unfreeze in elevator_init_mq() Ming Lei
2024-10-30 14:46 ` Christoph Hellwig
2024-10-30 14:59 ` Ming Lei [this message]
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=ZyJJ09rbc21frA-D@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=yi1.lai@linux.intel.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