From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: zlang@redhat.com, fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 09/11] generic/778: fix severe performance problems
Date: Fri, 31 Oct 2025 10:47:34 -0700 [thread overview]
Message-ID: <20251031174734.GD6178@frogsfrogsfrogs> (raw)
In-Reply-To: <20251022042731.GK3356773@frogsfrogsfrogs>
On Tue, Oct 21, 2025 at 09:27:31PM -0700, Darrick J. Wong wrote:
> On Tue, Oct 21, 2025 at 09:20:55PM -0700, Christoph Hellwig wrote:
> > On Tue, Oct 21, 2025 at 11:41:33AM -0700, Darrick J. Wong wrote:
> > > As a result, one loop through the test takes almost 4 minutes. The test
> > > loops 20 times, so it runs for 80 minutes(!!) which is a really long
> > > time.
> >
> > Heh. I'm glade none of my usual test setups even supports atomics I
> > guess :)
>
> FWIW the failure was on a regular xfs, no hw atomics. So in theory
> you're affected, but only if you pulled the 20 Oct next branch.
>
> > > So the first thing we do is observe that the giant slow loop is being
> > > run as a single thread on an empty filesystem. Most of the time the
> > > allocator generates a mostly physically contiguous file. We could
> > > fallocate the whole file instead of fallocating one block every other
> > > time through the loop. This halves the setup time.
> > >
> > > Next, we can also stuff the remaining pwrite commands into a bash array
> > > and only invoke xfs_io once every 128x through the loop. This amortizes
> > > the xfs_io startup time, which reduces the test loop runtime to about 20
> > > seconds.
> >
> > Wouldn't it make sense to adopt src/punch-alternating.c to also be
> > able to create unwritten extents instead of holes for the punched
> > range and run all of this from a C program?
>
> For the write sizes it comes up with I'm guessing that this test will
> almost always be poking the software fallbacks so it probably doesn't
> matter if the file is full of holes.
...and now running this with 32k-fsblocks reveals that the
atomic_write_loop code actually writes the wrong value into $tmp.aw and
only runs the loop once, so the test fails because dry_run thinks the
file size should be 0.
Also the cmds+=() line needs to insert its own -c or else you end up
writing huge files to $here. Ooops.
Will send a v2 once the brownpaperbag testing finishes.
--D
> > Otherwise this looks good:
> >
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Thanks!
>
> --D
>
next prev parent reply other threads:[~2025-10-31 17:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 18:39 [PATCHSET 1/2] fstests: more random fixes for v2025.10.05 Darrick J. Wong
2025-10-21 18:39 ` [PATCH 01/11] generic/427: try to ensure there's some free space before we do the aio test Darrick J. Wong
2025-10-21 18:39 ` [PATCH 02/11] common/rc: fix _require_xfs_io_shutdown Darrick J. Wong
2025-10-21 18:39 ` [PATCH 03/11] generic/742: avoid infinite loop if no fiemap results Darrick J. Wong
2025-10-21 18:40 ` [PATCH 04/11] generic/{482,757}: skip test if there are no FUA writes Darrick J. Wong
2025-10-22 4:17 ` Christoph Hellwig
2025-10-21 18:40 ` [PATCH 05/11] generic/772: actually check for file_getattr special file support Darrick J. Wong
2025-10-21 18:40 ` [PATCH 06/11] common/filter: fix _filter_file_attributes to handle src/file_attr.c file flags Darrick J. Wong
2025-10-22 4:18 ` Christoph Hellwig
2025-10-21 18:41 ` [PATCH 07/11] common/attr: fix _require_noattr2 Darrick J. Wong
2025-10-21 18:41 ` [PATCH 08/11] common: fix _require_xfs_io_command pwrite -A for various blocksizes Darrick J. Wong
2025-10-21 18:41 ` [PATCH 09/11] generic/778: fix severe performance problems Darrick J. Wong
2025-10-22 4:20 ` Christoph Hellwig
2025-10-22 4:27 ` Darrick J. Wong
2025-10-31 17:47 ` Darrick J. Wong [this message]
2025-11-01 9:34 ` Zorro Lang
2025-11-01 15:42 ` Darrick J. Wong
2025-11-01 16:22 ` Zorro Lang
2025-10-21 18:41 ` [PATCH 10/11] check: line up stdout columns Darrick J. Wong
2025-10-22 4:21 ` Christoph Hellwig
2025-10-21 18:42 ` [PATCH 11/11] fsx: don't print messages when atomic writes are explicitly disabled Darrick J. Wong
2025-10-22 4:21 ` Christoph Hellwig
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=20251031174734.GD6178@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox