DM-Devel Archive mirror
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	 Linus Torvalds <torvalds@linux-foundation.org>,
	Tejun Heo <tj@kernel.org>,  Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,  dm-devel@lists.linux.dev,
	Mike Snitzer <msnitzer@redhat.com>,
	 Ignat Korchagin <ignat@cloudflare.com>,
	 Damien Le Moal <damien.lemoal@wdc.com>,
	Hou Tao <houtao1@huawei.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] softirq: fix memory corruption when freeing tasklet_struct
Date: Fri, 26 Jan 2024 19:09:31 +0100 (CET)	[thread overview]
Message-ID: <d01a8554-10dd-1968-c9b0-f9ff16e6ac4@redhat.com> (raw)
In-Reply-To: <d390d7ee-f142-44d3-822a-87949e14608b@suse.de>



On Fri, 26 Jan 2024, Hannes Reinecke wrote:

> Oh, it's this time of the year again?
> (This topic regularly comes up ...)
> 
> The reason is not that it will disable dm-multipath (Mike Snitzer put in
> bio-based multipathing as an additional code path); the reason is that
> dm-multipath performance will suffer when you remove request-based DM.

Is there some benchmark that says how much will it suffer?

> 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.

The same problem exists in raid1 and there's a function read_balance that 
solves it. If the starting sector of a new bio matches the ending sector 
of a previous bio, then submit it for the same device.

> For request based multipathing the requests are already fully-formed,
> and scheduling across paths does not change them.
> Things are slightly better with multi-page bvecs nowadays, but the
> overall picture still stands.
> 
> 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.

You can set timeout of the underlying physical devices.

> Cheers,
> 
> Hannes

Mikulas


  reply	other threads:[~2024-01-26 18:09 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 [this message]
2024-01-29  8:26         ` request based dm-multipath, was " Christoph Hellwig
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=d01a8554-10dd-1968-c9b0-f9ff16e6ac4@redhat.com \
    --to=mpatocka@redhat.com \
    --cc=damien.lemoal@wdc.com \
    --cc=dlemoal@kernel.org \
    --cc=dm-devel@lists.linux.dev \
    --cc=hare@suse.de \
    --cc=houtao1@huawei.com \
    --cc=ignat@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=msnitzer@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).