From: John Garry <john.g.garry@oracle.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Cc: Zorro Lang <zlang@redhat.com>,
fstests@vger.kernel.org, Ritesh Harjani <ritesh.list@gmail.com>,
djwong@kernel.org, tytso@mit.edu
Subject: Re: [PATCH v2 05/13] generic/1226: Add atomic write test using fio crc check verifier
Date: Mon, 7 Jul 2025 09:02:38 +0100 [thread overview]
Message-ID: <ea53b415-7f54-4e96-a9a2-43c71e2b722d@oracle.com> (raw)
In-Reply-To: <aGfmUrj9HDrnwOyX@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com>
On 04/07/2025 15:35, Ojaswin Mujoo wrote:
> On Thu, Jul 03, 2025 at 05:26:49PM +0100, John Garry wrote:
>> On 03/07/2025 07:42, Ojaswin Mujoo wrote:
>>>>> Why serialization matters here, because even if device reorders our read
>>>>> before the atomic write, we still fetch an older $blocksize chunk which
>>>>> should have the data and the header.
>>>> Yes, we fetch $blocksize, but it may be as multiple read requests,
>>>> so we can have:
>>>>
>>>> partial read $blocksize request, atomic write request, partial read
>>>> $blocksize request
>>> Ahh now I get the picture. Since software atomic writes might have a
>>> value way higher than the max_sectors that the bio may split at, this
>>> causes the reads to split which is the issue happnes, as you mentioned.
>>
>> This issue also exists for atomic writes based on REQ_ATOMIC.
>
> Yep got it now, thanks.
>
>
>>
>>>
>>>>> The data crc should match the
>>>>> header because it would have gone atomically. What am I missing?
>>>>>
>>>>> (Or do you mean that max_sectors_kb is not big enough to support
>>>>> reads after software atomic writes and thats the issue?)
>>>>>
>>>>>> Can you cap at atomic write unit max opt? That will mean that we get
>>>>>> serialization from atomic write HW support.
>>>>>>
>>>>>> BTW, to repeat what I said before, it can also fail for atomic write bios
>>>>>> using HW support, as reads may be split.
>>>>> This one I can understand, the fio's read is split causing a short read
>>>>> and seems like fio is not requeing short read properly for the verify
>>>>> step(?) so it tries to verify against short read itself.
>>>> this is not an fio problem, as above.
>>> Yep got it, its the block layer splitting the reads.
>>>
>>> So as a solution, do you think it is okay to cap $blocksize to
>>> max_sectors_kb or would you suggest it would be better to just stick to
>>> awu max opt?
>>
>> I tend to think that it is better to cap at awu max opt. If zero, then don't
>> do the test.
>
> Hmm yep this makes sense but seems like we don't expose it yet in
> xfs_io. Will need to add that support as well.
Darrick sent a patch for that.
>
>>
>> What awu max opt is reported for ext4 (for awu max > FS block size)? Is
>> min(bigalloc size, bdev awu max)?
>
> For awu_max_opt is returned as 0 for ext4, since 0 indicates there
> is no such slow fallback. From commit
>
> 5d894321c49e fs: add atomic write unit max opt to statx
>
> ...
> When zero, it means that there is no such performance boundary.
> ...
>
Sure, but I think that for 1x FS block size atomic write unit max,
you can make atomic write unit max opt == atomic write unit max.
Or just always make atomic write unit max opt == atomic write unit max
always. I don't think that anyone will care.
BTW, you seem to have weird line endings configured in your client.
Thanks,
John
next prev parent reply other threads:[~2025-07-07 8:02 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 11:58 [PATCH v2 00/13] Add more tests for multi fs block atomic writes Ojaswin Mujoo
2025-06-26 11:58 ` [PATCH v2 01/13] common/rc: Add _min() and _max() helpers Ojaswin Mujoo
2025-06-26 11:58 ` [PATCH v2 02/13] common/rc: Fix fsx for ext4 with bigalloc Ojaswin Mujoo
2025-06-26 13:32 ` Theodore Ts'o
2025-06-30 15:28 ` Darrick J. Wong
2025-07-01 6:26 ` Ojaswin Mujoo
2025-07-02 15:13 ` Darrick J. Wong
2025-06-26 11:58 ` [PATCH v2 03/13] common/rc: Add a helper to run fsx on a given file Ojaswin Mujoo
2025-06-26 11:58 ` [PATCH v2 04/13] ltp/fsx.c: Add atomic writes support to fsx Ojaswin Mujoo
2025-06-26 11:58 ` [PATCH v2 05/13] generic/1226: Add atomic write test using fio crc check verifier Ojaswin Mujoo
2025-06-27 14:09 ` John Garry
2025-07-01 16:18 ` Ojaswin Mujoo
2025-07-02 7:46 ` John Garry
2025-07-03 6:42 ` Ojaswin Mujoo
2025-07-03 16:26 ` John Garry
2025-07-04 14:35 ` Ojaswin Mujoo
2025-07-04 15:23 ` Ojaswin Mujoo
2025-07-07 8:18 ` John Garry
2025-07-08 6:50 ` Ojaswin Mujoo
2025-07-08 11:11 ` John Garry
2025-07-08 12:01 ` Ojaswin Mujoo
2025-07-08 12:34 ` John Garry
2025-07-11 10:39 ` Ojaswin Mujoo
2025-07-11 10:51 ` John Garry
2025-07-11 18:16 ` Ojaswin Mujoo
2025-07-07 8:02 ` John Garry [this message]
2025-06-26 11:58 ` [PATCH v2 06/13] generic/1227: Add atomic write test using fio verify on file mixed mappings Ojaswin Mujoo
2025-06-27 14:48 ` John Garry
2025-06-26 11:58 ` [PATCH v2 07/13] generic/1228: Add atomic write multi-fsblock O_[D]SYNC tests Ojaswin Mujoo
2025-06-26 11:58 ` [PATCH v2 08/13] generic/1229: Stress fsx with atomic writes enabled Ojaswin Mujoo
2025-06-26 11:59 ` [PATCH v2 09/13] generic/1230: Add sudden shutdown tests for multi block atomic writes Ojaswin Mujoo
2025-06-27 16:11 ` John Garry
2025-07-01 6:34 ` Ojaswin Mujoo
2025-06-26 11:59 ` [PATCH v2 10/13] ext4/061: Atomic writes stress test for bigalloc using fio crc verifier Ojaswin Mujoo
2025-06-26 11:59 ` [PATCH v2 11/13] ext4/062: Atomic writes test for bigalloc using fio crc verifier on multiple files Ojaswin Mujoo
2025-06-26 11:59 ` [PATCH v2 12/13] ext4/063: Atomic write test for extent split across leaf nodes Ojaswin Mujoo
2025-06-26 11:59 ` [PATCH v2 13/13] ext4/064: Add atomic write tests for journal credit calculation Ojaswin Mujoo
2025-06-27 13:56 ` [PATCH v2 00/13] Add more tests for multi fs block atomic writes John Garry
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=ea53b415-7f54-4e96-a9a2-43c71e2b722d@oracle.com \
--to=john.g.garry@oracle.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--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