mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jinlong Chen <nickyc975@zju.edu.cn>
Cc: axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH 1/3] blk-mq: remove redundant call to blk_freeze_queue_start in blk_mq_destroy_queue
Date: Sun, 30 Oct 2022 13:19:10 -0700	[thread overview]
Message-ID: <036eb44a-fd6a-4460-49d0-5f596452d1e1@acm.org> (raw)
In-Reply-To: <fb1acbc.15062f.18429642056.Coremail.nickyc975@zju.edu.cn>

On 10/30/22 07:55, Jinlong Chen wrote:
>>> So I think there is a redundant call to blk_freeze_queue_start(), we
>>> just need to call blk_mq_freeze_queue_wait() after calling
>>> blk_queue_start_drain().
>>
>> I think it is on purpose that blk_queue_start_drain() freezes the
>> request queue and never unfreezes it. So if you want to change this
>> behavior it's up to you to motivate why you want to change this behavior
>> and also why it is safe to make that change. See also commit
>> d3cfb2a0ac0b ("block: block new I/O just after queue is set as dying").
> 
> I think there might be some misunderstanding. I didn't touch
> blk_queue_start_drain(), so its behavior is not changed. What I have done
> is just replacing blk_freeze_queue() with blk_mq_freeze_queue_wait() in
> blk_mq_destroy_queue().

Hi Jinlong,

Does this mean that you want me to provide more information about what I 
wrote? Without this patch, blk_mq_destroy_queue() uses two mechanisms to 
block future I/O requests:
1. Set the flag QUEUE_FLAG_DYING.
2. Freeze the request queue and leave it frozen.

Your patch modifies blk_mq_destroy_queue() such that it unfreezes the 
request queue after I/O has been quiesced instead of leaving it frozen. 
I would appreciate it if Ming Lei (Cc-ed) could comment on this change 
since I think that Ming introduced (2) in blk_mq_destroy_queue() 
(formerly called blk_cleanup_queue()).

Thanks,

Bart.

  reply	other threads:[~2022-10-30 20:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 10:02 [PATCH 0/3] cleanups for queue freezing functions Jinlong Chen
2022-10-29 10:02 ` [PATCH 1/3] blk-mq: remove redundant call to blk_freeze_queue_start in blk_mq_destroy_queue Jinlong Chen
2022-10-30  0:34   ` Bart Van Assche
2022-10-30  2:27     ` Jinlong Chen
2022-10-30 14:25       ` Bart Van Assche
2022-10-30 14:55         ` Jinlong Chen
2022-10-30 20:19           ` Bart Van Assche [this message]
2022-10-31  2:02             ` Jinlong Chen
2022-10-29 10:02 ` [PATCH 2/3] blk-mq: remove blk_freeze_queue Jinlong Chen
2022-10-29 10:02 ` [PATCH 3/3] block: hide back blk_freeze_queue_start and export its blk-mq alias Jinlong Chen

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=036eb44a-fd6a-4460-49d0-5f596452d1e1@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=nickyc975@zju.edu.cn \
    /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

all inboxes | Powered by JetHome®