From: Mikulas Patocka <mpatocka@redhat.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: dm-devel@lists.linux.dev, Mike Snitzer <snitzer@kernel.org>,
Christoph Hellwig <hch@lst.de>,
Benjamin Marzinski <bmarzins@redhat.com>
Subject: Re: [PATCH v2] dm-delay: Prevent zoned write reordering on suspend
Date: Wed, 16 Apr 2025 14:45:47 +0200 (CEST) [thread overview]
Message-ID: <cadd3b0f-2eca-c8af-62e9-27dd528007bd@redhat.com> (raw)
In-Reply-To: <79733459-5674-4bd3-9a33-dd5fbd7ed651@kernel.org>
On Tue, 15 Apr 2025, Damien Le Moal wrote:
> > Hi
> >
> > I looked at the generic device mapper code and it seems that ordering of
> > write bios is not guaranteed with any target in case of suspend/resume.
> >
> > * we suspend the device:
> > * received bios are added to md->deferred in queue_io
> >
> > * we resume the device:
> > * __dm_resume calls dm_queue_flush
> > * dm_queue_flush clears DMF_BLOCK_IO_FOR_SUSPEND and submits work item
> > &md->work (dm_wq_work)
> > * dm_resume clears DMF_SUSPENDED
> > * the device starts accepting new bios in dm_submit_bio
> > * dm_wq_work runs concurrently with new bios that are received, so
> > ordering of bios is not preserved
> >
> > So it doesn't make much sense to try to fix it in dm-delay, if it isn't
> > supposed to work at all.
>
> Just need to fix the generic DM resume code then. This patch fixing dm-delay is
> still relevant even with DM generic resume fixes.
>
> I can resend the dm-delay fix together with DM core resume fixes. And Benjamin
> can re-send the dm-delay kthread timer cleanup independently (I will rebase) or
> on top of that fix series. Does that work for you ?
I would like to know why is this needed. If you have a zoned device, you
can send one big write bio, wait for the big bio to finish, send another
big write bio, wait for it to finish and so on. Then, there will be at
most one write bio oustanding and you don't have to care about kernel
reordering in-flight bios.
It seems that you want to send many small overlapping write bios - the
question is why? Why can't the application accumulate the content and send
it as one big bio?
I'm a bit worried that supporting this ordering will just bloat the kernel
with marginal benefit.
Mikulas
next prev parent reply other threads:[~2025-04-16 12:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 0:04 [PATCH v2] dm-delay: Prevent zoned write reordering on suspend Damien Le Moal
2025-04-11 21:01 ` Benjamin Marzinski
2025-04-14 13:19 ` Mikulas Patocka
2025-04-15 8:08 ` Damien Le Moal
2025-04-16 12:45 ` Mikulas Patocka [this message]
2025-04-17 22:15 ` Damien Le Moal
2025-04-22 11:27 ` Mikulas Patocka
2025-04-22 12:20 ` Damien Le Moal
2025-04-22 18:42 ` Mikulas Patocka
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=cadd3b0f-2eca-c8af-62e9-27dd528007bd@redhat.com \
--to=mpatocka@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=snitzer@kernel.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 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.