From: Ackerley Tng <ackerleytng@google.com>
To: Zi Yan <ziy@nvidia.com>
Cc: willy@infradead.org, akpm@linux-foundation.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, david@redhat.com,
michael.roth@amd.com, vannapurve@google.com
Subject: Re: [RFC PATCH 4/4] XArray: test: Increase split order test range in check_split()
Date: Mon, 08 Dec 2025 08:47:05 -0800 [thread overview]
Message-ID: <diqzy0nc53au.fsf@google.com> (raw)
In-Reply-To: <E3AB23B6-9B6C-432C-BD92-27520ADA0739@nvidia.com>
Zi Yan <ziy@nvidia.com> writes:
> On 17 Nov 2025, at 17:47, Ackerley Tng wrote:
>
>> Expand the range of order values for check_split_1() from 2 *
>> XA_CHUNK_SHIFT to 4 * XA_CHUNK_SHIFT to test splitting beyond 2 levels.
>>
>> Separate the loops for check_split_1() and check_split_2() calls, since
>> xas_try_split() does not yet support splitting beyond 2 levels.
>
> xas_try_split() is designed to only split at most 1 level. It is used
> for non-uniform split, which always splits a folio from order N to order N-1.
>
Thanks for explaining! In the next revision, I'll rename
+ check_split_1() to check_split_uniform() and
+ check_split_2() to check_split_non_uniform()
in an earlier patch before, fixing the wording, in this patch, to be
Separate the loops for check_split_uniform() and
check_split_non_uniform() calls. Expanding the range of order values
only applies for uniform splits, since non-uniform splits always split
a folio from order N to order N-1.
>>
>> Signed-off-by: Ackerley Tng <ackerleytng@google.com>
>> ---
>> lib/test_xarray.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/test_xarray.c b/lib/test_xarray.c
>> index 42626fb4dc0e..fbdf647e4ef8 100644
>> --- a/lib/test_xarray.c
>> +++ b/lib/test_xarray.c
>> @@ -1905,12 +1905,16 @@ static noinline void check_split(struct xarray *xa)
>>
>> XA_BUG_ON(xa, !xa_empty(xa));
>>
>> - for (order = 1; order < 2 * XA_CHUNK_SHIFT; order++) {
>> + for (order = 1; order < 4 * XA_CHUNK_SHIFT; order++) {
>> for (new_order = 0; new_order < order; new_order++) {
>> check_split_1(xa, 0, order, new_order);
>> check_split_1(xa, 1UL << order, order, new_order);
>> check_split_1(xa, 3UL << order, order, new_order);
>> + }
>> + }
>>
>> + for (order = 1; order < 2 * XA_CHUNK_SHIFT; order++) {
>> + for (new_order = 0; new_order < order; new_order++) {
>> check_split_2(xa, 0, order, new_order);
>> check_split_2(xa, 1UL << order, order, new_order);
>> check_split_2(xa, 3UL << order, order, new_order);
>> --
>> 2.52.0.rc1.455.g30608eb744-goog
>
>
> --
> Best Regards,
> Yan, Zi
next prev parent reply other threads:[~2025-12-08 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 22:46 [RFC PATCH 0/4] Extend xas_split* to support splitting arbitrarily large entries Ackerley Tng
2025-11-17 22:46 ` [RFC PATCH 1/4] XArray: Initialize nodes while splitting instead of while allocating Ackerley Tng
2025-11-17 22:46 ` [RFC PATCH 2/4] XArray: Update xas_split_alloc() to allocate enough nodes to split large entries Ackerley Tng
2025-11-17 22:47 ` [RFC PATCH 3/4] XArray: Support splitting for arbitrarily " Ackerley Tng
2025-11-17 22:47 ` [RFC PATCH 4/4] XArray: test: Increase split order test range in check_split() Ackerley Tng
2025-12-08 3:32 ` Zi Yan
2025-12-08 16:47 ` Ackerley Tng [this message]
2025-11-17 23:22 ` [RFC PATCH 0/4] Extend xas_split* to support splitting arbitrarily large entries Matthew Wilcox
2025-11-17 23:43 ` Ackerley Tng
2025-11-18 8:51 ` David Hildenbrand (Red Hat)
2025-12-05 0:38 ` Ackerley Tng
2025-11-18 8:46 ` [syzbot ci] " syzbot ci
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=diqzy0nc53au.fsf@google.com \
--to=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=michael.roth@amd.com \
--cc=vannapurve@google.com \
--cc=willy@infradead.org \
--cc=ziy@nvidia.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;
as well as URLs for NNTP newsgroup(s).