From: Mike Snitzer <snitzer@kernel.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>,
Yang Yang <yang.yang@vivo.com>, Alasdair Kergon <agk@redhat.com>,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dm: optimize flushes
Date: Thu, 23 May 2024 14:02:29 -0400 [thread overview]
Message-ID: <Zk-EtZE4C7bndEYn@kernel.org> (raw)
In-Reply-To: <44afd6c8-d36a-4b9d-e77f-fca269a9897b@redhat.com>
On Thu, May 23, 2024 at 07:46:25PM +0200, Mikulas Patocka wrote:
> Hi
>
> Here I'm resending the patch, with more comments and explanations added.
>
> Mikulas
>
>
> From: Mikulas Patocka <mpatocka@redhat.com>
>
> Device mapper sends flush bios to all the targets and the targets send it
> to the underlying device. That may be inefficient, for example if a table
> contains 10 linear targets pointing to the same physical device, then
> device mapper would send 10 flush bios to that device - despite the fact
> that only one bio would be sufficient.
>
> This commit optimizes the flush behavior. It introduces a per-target
> variable flush_bypasses_map - it is set when the target supports flush
> optimization - currently, the dm-linear and dm-stripe targets support it.
> When all the targets in a table have flush_bypasses_map,
> flush_bypasses_map on the table is set. __send_empty_flush tests if the
> table has flush_bypasses_map - and if it has, no flush bios are sent to
> the targets via the "map" method and the list dm_table->devices is
> iterated and the flush bios are sent to each member of the list.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Suggested-by: Yang Yang <yang.yang@vivo.com>
Nicely done, please feel free to stage for 6.11 (create a new
'dm-6.11' branch starting from 'dm-6.10' -- we'll need to rebase
dm-6.11 to 6.10-rc2 or so but at least we'll get this commit in the
pipeline, push to 'for-next').
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
next prev parent reply other threads:[~2024-05-23 18:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 9:04 [PATCH 0/5] dm: empty flush optimization Yang Yang
2024-05-14 9:04 ` [PATCH 1/5] dm: introduce flush_pass_around flag Yang Yang
2024-05-14 9:04 ` [PATCH 2/5] dm: add __send_empty_flush_bios() helper Yang Yang
2024-05-14 9:04 ` [PATCH 3/5] dm: support retrieving struct dm_target from struct dm_dev Yang Yang
2024-05-15 15:42 ` Benjamin Marzinski
2024-05-15 15:53 ` Mikulas Patocka
2024-05-16 20:49 ` [PATCH] dm: optimize flushes Mikulas Patocka
2024-05-17 8:55 ` YangYang
2024-05-22 16:10 ` Mike Snitzer
2024-05-22 21:05 ` Mikulas Patocka
2024-05-23 17:46 ` [PATCH v2] " Mikulas Patocka
2024-05-23 18:02 ` Mike Snitzer [this message]
2024-05-28 11:37 ` Mikulas Patocka
2024-05-23 22:17 ` Eric Wheeler
2024-05-15 16:00 ` [PATCH 3/5] dm: support retrieving struct dm_target from struct dm_dev Benjamin Marzinski
2024-05-16 2:12 ` YangYang
2024-05-16 16:39 ` Benjamin Marzinski
2024-05-16 1:55 ` YangYang
2024-05-16 15:29 ` Benjamin Marzinski
2024-05-17 7:48 ` YangYang
2024-05-17 14:33 ` Benjamin Marzinski
2024-05-20 3:12 ` YangYang
2024-05-14 9:04 ` [PATCH 4/5] dm: Avoid sending redundant empty flush bios to the same block device Yang Yang
2024-05-14 9:04 ` [PATCH 5/5] dm linear: enable flush optimization function Yang Yang
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=Zk-EtZE4C7bndEYn@kernel.org \
--to=snitzer@kernel.org \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=yang.yang@vivo.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