linux-block.vger.kernel.org archive mirror
 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>
Subject: Re: [PATCH 0/3] block: don't drain file system I/O on del_gendisk
Date: Mon, 17 Jan 2022 09:13:21 +0100	[thread overview]
Message-ID: <20220117081321.GA22627@lst.de> (raw)
In-Reply-To: <20220116041815.1218170-1-ming.lei@redhat.com>

On Sun, Jan 16, 2022 at 12:18:12PM +0800, Ming Lei wrote:
> Hello,
> 
> Draining FS I/O on del_gendisk() is added for just avoiding to refer to
> recently added q->disk in IO path, and it isn't actually needed.

We need it to have proper life times in the block layer.  Everything only
needed for file system I/O and not blk-mq specific should slowly move
from the request_queue to the gendisk and I have patches going in
that direction.  In the end only the SCSI discovery code and the case
of /dev/sg without SCSI ULP will ever do passthrough I/O purely on the
gendisk.

So I think this series is moving in the wrong direction.  If you care
about no doing two freeze cycles the right thing to do is to record
if we ever did non-disk based passthrough I/O on a requeue_queue and
if not simplify the request_queue cleanup.  Doing this is on my TODO
list but I haven't look into the details yet.

> 1) queue freezing can't drain FS I/O for bio based driver

This is something I've started looking into it.

> 2) it isn't easy to move elevator/cgroup/throttle shutdown during
> del_gendisk, and q->disk can still be referred in these code paths

I've also done some prep work to land this cycle here, as all that
code is only used for FS I/O.

  parent reply	other threads:[~2022-01-17  8:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16  4:18 [PATCH 0/3] block: don't drain file system I/O on del_gendisk Ming Lei
2022-01-16  4:18 ` [PATCH 1/3] block: move freeing disk into queue's release handler Ming Lei
2022-01-18  8:22   ` Christoph Hellwig
2022-01-18 15:47     ` Ming Lei
2022-01-18 15:59       ` Ming Lei
2022-01-18 16:19       ` Christoph Hellwig
2022-01-16  4:18 ` [PATCH 2/3] block: revert aec89dc5d421 block: keep q_usage_counter in atomic mode after del_gendisk Ming Lei
2022-01-16  4:18 ` [PATCH 3/3] block: revert 8e141f9eb803 block: drain file system I/O on del_gendisk Ming Lei
2022-01-17  8:13 ` Christoph Hellwig [this message]
2022-01-17  9:08   ` [PATCH 0/3] block: don't " Ming Lei
2022-01-18  8:25     ` Christoph Hellwig
2022-01-19  9:02       ` 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=20220117081321.GA22627@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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;
as well as URLs for NNTP newsgroup(s).