linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sidhartha Kumar <sidhartha.kumar@oracle.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] maple_tree: Testing fix for spanning store on 32b
Date: Thu, 28 Aug 2025 11:25:04 -0400	[thread overview]
Message-ID: <133e0b4b-1f3c-4a62-9876-f191f0befd46@oracle.com> (raw)
In-Reply-To: <20250828003023.418966-3-Liam.Howlett@oracle.com>

On 8/27/25 8:30 PM, Liam R. Howlett wrote:
> 32 bit nodes have a larger branching factor.  This affects the required
> value to cause a height change.  Update the spanning store height test
> to work for both 64 and 32 bit nodes.
> 
> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>

Fixes: f9d3a963fef4 ("maple_tree: use height and depth consistently")

Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>> ---
>   tools/testing/radix-tree/maple.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c
> index 90a0db45a33c3..05714c22994ea 100644
> --- a/tools/testing/radix-tree/maple.c
> +++ b/tools/testing/radix-tree/maple.c
> @@ -36327,13 +36327,18 @@ extern void test_kmem_cache_bulk(void);
>   static inline void check_spanning_store_height(struct maple_tree *mt)
>   {
>   	int index = 0;
> +	int last = 140;
>   	MA_STATE(mas, mt, 0, 0);
>   	mas_lock(&mas);
>   	while (mt_height(mt) != 3) {
>   		mas_store_gfp(&mas, xa_mk_value(index), GFP_KERNEL);
>   		mas_set(&mas, ++index);
>   	}
> -	mas_set_range(&mas, 90, 140);
> +
> +	if (MAPLE_32BIT)
> +		last = 155; /* 32 bit higher branching factor. */
> +
> +	mas_set_range(&mas, 90, last);
>   	mas_store_gfp(&mas, xa_mk_value(index), GFP_KERNEL);
>   	MT_BUG_ON(mt, mas_mt_height(&mas) != 2);
>   	mas_unlock(&mas);



      reply	other threads:[~2025-08-28 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28  0:30 [PATCH 0/2] maple_tree: Fix testing for 32bit compiles Liam R. Howlett
2025-08-28  0:30 ` [PATCH 1/2] maple_tree: Fix testing for 32 bit builds Liam R. Howlett
2025-08-28 15:12   ` Sidhartha Kumar
2025-08-28 15:29     ` Liam R. Howlett
2025-08-28  0:30 ` [PATCH 2/2] maple_tree: Testing fix for spanning store on 32b Liam R. Howlett
2025-08-28 15:25   ` Sidhartha Kumar [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=133e0b4b-1f3c-4a62-9876-f191f0befd46@oracle.com \
    --to=sidhartha.kumar@oracle.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).