FS/XFS testing framework
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.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: Tue, 21 Oct 2025 21:20:55 -0700	[thread overview]
Message-ID: <aPhbp5xf9DgX0If7@infradead.org> (raw)
In-Reply-To: <176107188833.4163693.9661686434641271120.stgit@frogsfrogsfrogs>

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 :)

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

Otherwise this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


  reply	other threads:[~2025-10-22  4:20 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 [this message]
2025-10-22  4:27     ` Darrick J. Wong
2025-10-31 17:47       ` Darrick J. Wong
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=aPhbp5xf9DgX0If7@infradead.org \
    --to=hch@infradead.org \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.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