All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	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 15:46:52 +0100	[thread overview]
Message-ID: <20241030144652.GD32043@lst.de> (raw)
In-Reply-To: <20241030124240.230610-6-ming.lei@redhat.com>

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?


  reply	other threads:[~2024-10-30 14:46 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 [this message]
2024-10-30 14:59     ` Ming Lei

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=20241030144652.GD32043@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=ming.lei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.