Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Dave Chinner <dgc@kernel.org>,
	 "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	John Garry <john.garry@linux.dev>
Subject: Re: [bug report] fstests generic/774 hang again
Date: Thu, 22 Oct 2026 20:18:23 +0900	[thread overview]
Message-ID: <atnvvalMNn2iAAI0@shinmob> (raw)
In-Reply-To: <20260925230329.GE2705364@frogsfrogsfrogs>

On Sep 25, 2026 / 16:03, Darrick J. Wong wrote:
[...]
> 
> Yeah, I think you're on the right track with the dynamic tr_logcount
> changes but I wonder if you want to constrain the max software atomic
> write size so that we don't end up with gigantic chains that consume
> significant portions of the log for a single write?
> 
> Admittedly I see the multi-megabyte atomic write limits and marvel at
> how far we've drifted from the original requirements.

Darrick, thank you for the comments, and sorry for my slow response. Today,
I found some time slot to try out max atomic write bytes capping. I took a
look in your code snippet below, and was scratching my head.

> 
> --D
> 
> diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
> index 1c20a7c27aa1bf..2e84544cd22a0a 100644
> --- a/fs/xfs/libxfs/xfs_trans_resv.c
> +++ b/fs/xfs/libxfs/xfs_trans_resv.c
> @@ -1473,6 +1473,10 @@ xfs_calc_max_atomic_write_fsblocks(
>         struct xfs_mount                *mp)
>  {
>         const struct xfs_trans_res      *resv = &M_RES(mp)->tr_atomic_ioend;
> +       const unsigned int              max_log_bytes =
> +               XFS_FSB_TO_B(mp, mp->m_sb.sb_logblocks * 10 / 4);
> +       const unsigned int              log_bytes_per_aw_block =
> +               (resv->tr_logres * resv->tr_logcount * 5) / 4;

I wonder what the numbers in the two lines above mean. I think 5 means the
number of transaction rolls required for an atomic write. But not sure about 10
and 4. May I ask you to elaborate them?

Anyway, I applied this patch, and confirmed that awu_max reduced from 1024 to
64 in my test setup (4MiB to 256KiB). So, it looks working as expected.

      reply	other threads:[~2026-10-22 11:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  9:34 [bug report] fstests generic/774 hang again Shin'ichiro Kawasaki
2026-09-15 10:00 ` John Garry
2026-09-15 11:48   ` Shin'ichiro Kawasaki
2026-09-15 14:48     ` John Garry
2026-09-15 14:50       ` Darrick J. Wong
2026-09-15 15:41         ` John Garry
2026-09-16 10:23           ` John Garry
2026-09-16 22:23             ` Dave Chinner
2026-09-17  8:28               ` John Garry
2026-09-17 21:20                 ` Dave Chinner
2026-09-17  6:30             ` Shin'ichiro Kawasaki
2026-09-16  2:53     ` Shin'ichiro Kawasaki
2026-09-16 21:45 ` Dave Chinner
2026-09-17  6:52   ` Shin'ichiro Kawasaki
2026-09-17 10:45     ` Shin'ichiro Kawasaki
2026-09-17 21:24       ` Dave Chinner
2026-09-19 11:53         ` Shin'ichiro Kawasaki
2026-09-21 22:05           ` Dave Chinner
2026-09-25  1:32             ` Shin'ichiro Kawasaki
2026-09-27 21:30               ` Dave Chinner
2026-09-28  2:45                 ` Darrick J. Wong
2026-09-22  0:28   ` Darrick J. Wong
2026-09-25  1:38     ` Shin'ichiro Kawasaki
2026-09-25 23:03       ` Darrick J. Wong
2026-10-22 11:18         ` Shin'ichiro Kawasaki [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=atnvvalMNn2iAAI0@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=dgc@kernel.org \
    --cc=djwong@kernel.org \
    --cc=john.garry@linux.dev \
    --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