From: "Darrick J. Wong" <djwong@kernel.org>
To: John Garry <john.g.garry@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
alexjlzheng@gmail.com, cem@kernel.org, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jinliang Zheng <alexjlzheng@tencent.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH] xfs: fix confused tracepoints in xfs_reflink_end_atomic_cow()
Date: Mon, 24 Nov 2025 18:18:00 -0800 [thread overview]
Message-ID: <20251125021800.GA6061@frogsfrogsfrogs> (raw)
In-Reply-To: <2ef7123a-cfc7-40b5-beb3-e23db1a0d75f@oracle.com>
On Mon, Nov 24, 2025 at 02:25:29PM +0000, John Garry wrote:
> On 24/11/2025 14:04, Christoph Hellwig wrote:
> > On Mon, Nov 24, 2025 at 10:57:24AM +0000, John Garry wrote:
> > > Commit d6f215f35963 might be able to explain that.
> >
> > I don't think so.
>
> I am just pointing out why it was changed to use a separate transaction per
> extent [and why the cow end handler for atomic writes is different].
>
> > That commit splits up the operation so to avoid
> > doing the entire operation in a single transaction, and the rationale
> > for this is sound. But the atomic work showed that it went to far,
It did go too far, because when d6f215f3596 was written we didn't have
these nice helpers that guestimate how many deferred remapping ops we
can attach to a single fresh transaction.
Nowadays we probably could speed up the non-atomic remapping path by
computing a safe batching factor and doing that much instead of only one
extent per transaction chain. Stupidly hardcoding 16 would be enough to
achieve an order of magnitude improvement.
Nobody's complained about slow ioend performance enough to do that work
and then QA it though. Remember, that d6f commit comes with the
following barb:
"Note that this can be reproduced after ~320 million fsx ops while
running generic/938 (long soak directio fsx exerciser):"
(generic/938 is now generic/521.)
--D
> > because we can still batch up a fair amount of conversions. I think
> > the argument of allowing to batch up as many transactions as we allow
> > in an atomic write still makes perfect sense.
> >
>
> Sure, Darrick knows more about this than me (so I'll let him comment).
>
>
prev parent reply other threads:[~2025-11-25 2:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 11:56 [PATCH] xfs: fix confused tracepoints in xfs_reflink_end_atomic_cow() alexjlzheng
2025-11-24 9:34 ` Christoph Hellwig
2025-11-24 10:57 ` John Garry
2025-11-24 14:04 ` Christoph Hellwig
2025-11-24 14:25 ` John Garry
2025-11-25 2:18 ` Darrick J. Wong [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=20251125021800.GA6061@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=alexjlzheng@gmail.com \
--cc=alexjlzheng@tencent.com \
--cc=cem@kernel.org \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=john.g.garry@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox