All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Hannes Reinecke <hare@suse.de>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Mikulas Patocka <mpatocka@redhat.com>,
	dm-devel@lists.linux.dev, Mike Snitzer <msnitzer@redhat.com>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	linux-block@vger.kernel.org
Subject: request based dm-multipath, was Re: [PATCH] softirq: fix memory corruption when freeing tasklet_struct
Date: Mon, 29 Jan 2024 00:26:28 -0800	[thread overview]
Message-ID: <ZbdhNEkEfqWsE1yy@infradead.org> (raw)
In-Reply-To: <d390d7ee-f142-44d3-822a-87949e14608b@suse.de>

On Fri, Jan 26, 2024 at 07:56:39AM +0100, Hannes Reinecke wrote:
> DM-multipath schedules based on request (if you use the request-based
> interface) or bios (if you use the bio-based interface).
> Any merge decision is typically done by the block layer when combining bios
> into requests; and you can only merge bios if the bvecs are adjacent.
> So if you use bio-based multipathing you will spread sequential bios
> across all paths, leaving the block layer unable to merge requests.

While I think the current code would do that, there is nothing inherent
in the interface forcing it to do that.  The blk_plug allows drivers
to attach callbacks to batch up plugged bios, and the md raid code makes
use of that to get larger I/O, which is rather essential for partity
RAID.

> Another thing is timeouts; bios don't do timeouts, so a bio can run
> for an arbitrary time with no chance of interrupting it.
> Requests do have a timeout, and will be aborted from the driver when
> the timeout is hit.
> Seeing that 99% of all I/O issues I've seen _are_ timeouts it becomes
> a crucial feature if you want dm-multipath to control failover time.

This does not matter - a timeout bio will return an error to the
submitter even on a request based driver unless the timeout handler
fixed it up.  And there is nothing preventing a bio based driver from
having it's own timeout.  We had quite a few in the past.  But dm-rq
doesn't even set a timeout, so for the current situation this is
100% irrelevant.

So while I'm not sure if using the existing bio based mpath code with
plugging would be enough to suite all users of dm-multipath, I'd
really love to see someone actually trying it.  Removing the request
based path would significantly simplify dm, and also remove a fair
amount of hacks from the block layer.

  parent reply	other threads:[~2024-01-29  8:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 18:29 [PATCH] softirq: fix memory corruption when freeing tasklet_struct Mikulas Patocka
2024-01-25 19:51 ` Linus Torvalds
2024-01-25 22:04   ` Mikulas Patocka
2024-01-25 23:15     ` Damien Le Moal
2024-01-26  6:56       ` Hannes Reinecke
2024-01-26 18:09         ` Mikulas Patocka
2024-01-29  8:26         ` Christoph Hellwig [this message]
2024-01-25 22:51   ` Ignat Korchagin
2024-01-26  0:33   ` Tejun Heo
2024-01-26 18:36   ` Allen
2024-01-26 23:43   ` Tejun Heo
2024-01-27  3:13     ` Allen
2024-01-27 18:37     ` Tejun Heo
2024-01-30  9:19       ` Tejun Heo
2024-01-29 17:00     ` Allen
2024-01-29 17:06       ` Tejun Heo
2024-04-09 14:15 ` Li Lingfeng

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=ZbdhNEkEfqWsE1yy@infradead.org \
    --to=hch@infradead.org \
    --cc=damien.lemoal@wdc.com \
    --cc=dlemoal@kernel.org \
    --cc=dm-devel@lists.linux.dev \
    --cc=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=msnitzer@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 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.