From: Ming Lei <[email protected]>
To: Dave Chinner <[email protected]>
Cc: Christoph Hellwig <[email protected]>,
Mikulas Patocka <[email protected]>,
Jens Axboe <[email protected]>, Jooyung Han <[email protected]>,
Alasdair Kergon <[email protected]>,
Mike Snitzer <[email protected]>,
Heinz Mauelshagen <[email protected]>,
[email protected], [email protected],
[email protected], [email protected],
[email protected]
Subject: Re: [PATCH] the dm-loop target
Date: Tue, 25 Mar 2025 20:23:43 +0800 [thread overview]
Message-ID: <Z-KgT3Xine0kcVo-@fedora> (raw)
In-Reply-To: <[email protected]>
On Tue, Mar 25, 2025 at 09:15:26PM +1100, Dave Chinner wrote:
> On Thu, Mar 20, 2025 at 03:41:58PM +0800, Ming Lei wrote:
> > On Thu, Mar 20, 2025 at 12:08:19AM -0700, Christoph Hellwig wrote:
> > > On Tue, Mar 18, 2025 at 05:34:28PM +0800, Ming Lei wrote:
> > > > On Tue, Mar 18, 2025 at 12:57:17AM -0700, Christoph Hellwig wrote:
> > > > > On Tue, Mar 18, 2025 at 03:27:48PM +1100, Dave Chinner wrote:
> > > > > > Yes, NOWAIT may then add an incremental performance improvement on
> > > > > > top for optimal layout cases, but I'm still not yet convinced that
> > > > > > it is a generally applicable loop device optimisation that everyone
> > > > > > wants to always enable due to the potential for 100% NOWAIT
> > > > > > submission failure on any given loop device.....
> > > >
> > > > NOWAIT failure can be avoided actually:
> > > >
> > > > https://lore.kernel.org/linux-block/[email protected]/
> > >
> > > That's a very complex set of heuristics which doesn't match up
> > > with other uses of it.
> >
> > I'd suggest you to point them out in the patch review.
>
> Until you pointed them out here, I didn't know these patches
> existed.
>
> Please cc linux-fsdevel on any loop device changes you are
> proposing, Ming. It is as much a filesystem driver as it is a block
> device, and it changes need review from both sides of the fence.
Please see the patchset:
https://lore.kernel.org/linux-block/[email protected]/
>
> > > > > Yes, I think this is a really good first step:
> > > > >
> > > > > 1) switch loop to use a per-command work_item unconditionally, which also
> > > > > has the nice effect that it cleans up the horrible mess of the
> > > > > per-blkcg workers. (note that this is what the nvmet file backend has
> > > >
> > > > It could be worse to take per-command work, because IO handling crosses
> > > > all system wq worker contexts.
> > >
> > > So do other workloads with pretty good success.
> > >
> > > >
> > > > > always done with good result)
> > > >
> > > > per-command work does burn lots of CPU unnecessarily, it isn't good for
> > > > use case of container
> > >
> > > That does not match my observations in say nvmet. But if you have
> > > numbers please share them.
> >
> > Please see the result I posted:
> >
> > https://lore.kernel.org/linux-block/Z9FFTiuMC8WD6qMH@fedora/
>
> You are arguing in circles about how we need to optimise for static
> file layouts.
>
> Please listen to the filesystem people when they tell you that
> static file layouts are a -secondary- optimisation target for loop
> devices.
>
> The primary optimisation target is the modification that makes all
> types of IO perform better in production, not just the one use case
> that overwrite-specific IO benchmarks exercise.
>
> If you want me to test your changes, I have a very loop device heavy
> workload here - it currently creates about 300 *sparse* loop devices
> totalling about 1.2TB of capacity, then does all sorts of IO to them
> through both the loop devices themselves and filesystems created on
> top of the loop devices. It typically generates 4-5GB/s of IO
> through the loop devices to the backing filesystem and it's physical
> storage.
The patchset does cover the sparse backfile, and I also provide one test
case in which one completely sparse file is used, and make sure that
there isn't regression in this case.
This patchset is supposed to address Mikulas's case of stable FS mapping,
meantime without introducing regression on other cases, such as
the sparse backing file.
>
> Speeding up or slowing down IO submission through the loop devices
> has direct impact on the speed of the workload. Using buffered IO
> through the loop device right now is about 25% faster than using
> aio+dio for the loop because there is some amount of re-read and
> re-write in the filesystem IO patterns. That said, AIO+DIO should be
> much faster than it is, hence my interest in making all the AIO+DIO
> IO submission independent of potential blocking operations.
>
> Hence if you have patch sets that improve loop device performance,
> then you need to make sure filesystem people like myself see those
> patch series so they can be tested and reviewed in a timely manner.
> That means you need to cc loop device patches to linux-fsdevel....
OK, will Cc you and linux-fsdevel in future loop patch submission.
Thanks,
Ming
prev parent reply other threads:[~2025-03-25 12:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <Z8zbYOkwSaOJKD1z@fedora>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
2025-03-11 10:43 ` [PATCH] the dm-loop target Ming Lei
2025-03-12 2:34 ` Dave Chinner
2025-03-12 6:24 ` Christoph Hellwig
2025-03-12 8:26 ` Ming Lei
2025-03-13 1:36 ` Ming Lei
2025-03-13 16:36 ` Mikulas Patocka
2025-03-18 4:27 ` Dave Chinner
2025-03-18 7:57 ` Christoph Hellwig
2025-03-18 9:34 ` Ming Lei
2025-03-20 7:08 ` Christoph Hellwig
2025-03-20 7:41 ` Ming Lei
2025-03-20 14:22 ` Christoph Hellwig
2025-03-20 14:36 ` Ming Lei
2025-03-25 10:15 ` Dave Chinner
2025-03-25 12:23 ` Ming Lei [this message]
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=Z-KgT3Xine0kcVo-@fedora \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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