From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
maple-tree@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, stable@kernel.org,
Suren Baghdasaryan <surenb@google.com>,
Hailong Liu <hailong.liu@oppo.com>,
zhangpeng.00@bytedance.com, Steve Kang <Steve.Kang@unisoc.com>,
Matthew Wilcox <willy@infradead.org>,
Sidhartha Kumar <sidhartha.kumar@oracle.com>,
"Liam R. Howlett" <howlett@gmail.com>
Subject: Re: [PATCH 1/3] testing/raix-tree/maple: Increase readers and reduce delay for faster machines
Date: Fri, 20 Jun 2025 16:43:19 +0100 [thread overview]
Message-ID: <6e5ad25c-3f6d-4f78-b39f-91e0ebdd5fc8@lucifer.local> (raw)
In-Reply-To: <20250616184521.3382795-2-Liam.Howlett@oracle.com>
On Mon, Jun 16, 2025 at 02:45:19PM -0400, Liam R. Howlett wrote:
> From: "Liam R. Howlett" <howlett@gmail.com>
>
> Faster machines may not see the initial or updated value in the race
> condition. Reduce the delay so that faster machines are less likely to
> fail testing of the race conditions.
>
> Signed-off-by: Liam R. Howlett <howlett@gmail.com>
Seems reasonable so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> tools/testing/radix-tree/maple.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c
> index 8b97aac1084e9..6a5b0342941c4 100644
> --- a/tools/testing/radix-tree/maple.c
> +++ b/tools/testing/radix-tree/maple.c
> @@ -35062,7 +35062,7 @@ void run_check_rcu_slowread(struct maple_tree *mt, struct rcu_test_struct *vals)
>
> int i;
> void *(*function)(void *);
> - pthread_t readers[20];
> + pthread_t readers[30];
> unsigned int index = vals->index;
>
> mt_set_in_rcu(mt);
> @@ -35080,14 +35080,14 @@ void run_check_rcu_slowread(struct maple_tree *mt, struct rcu_test_struct *vals)
> }
> }
>
> - usleep(5); /* small yield to ensure all threads are at least started. */
> + usleep(3); /* small yield to ensure all threads are at least started. */
>
> while (index <= vals->last) {
> mtree_store(mt, index,
> (index % 2 ? vals->entry2 : vals->entry3),
> GFP_KERNEL);
> index++;
> - usleep(5);
> + usleep(2);
Just one question... have you considered hibernation at all?
> }
>
> while (i--)
> @@ -35098,6 +35098,7 @@ void run_check_rcu_slowread(struct maple_tree *mt, struct rcu_test_struct *vals)
> MT_BUG_ON(mt, !vals->seen_entry3);
> MT_BUG_ON(mt, !vals->seen_both);
> }
> +
> static noinline void __init check_rcu_simulated(struct maple_tree *mt)
> {
> unsigned long i, nr_entries = 1000;
> --
> 2.47.2
>
next prev parent reply other threads:[~2025-06-20 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 18:45 [PATCH 0/3] Fix MA_STATE_PREALLOC issue Liam R. Howlett
2025-06-16 18:45 ` [PATCH 1/3] testing/raix-tree/maple: Increase readers and reduce delay for faster machines Liam R. Howlett
2025-06-20 15:43 ` Lorenzo Stoakes [this message]
2025-06-16 18:45 ` [PATCH 2/3] maple_tree: Fix MA_STATE_PREALLOC flag in mas_preallocate() Liam R. Howlett
2025-06-20 15:50 ` Lorenzo Stoakes
2025-06-16 18:45 ` [PATCH 3/3] tools/testing/radix-tree: Test maple tree chaining mas_preallocate() calls Liam R. Howlett
2025-06-20 15:51 ` Lorenzo Stoakes
2025-06-16 23:24 ` [PATCH 0/3] Fix MA_STATE_PREALLOC issue Andrew Morton
2025-06-20 18:20 ` Liam R. Howlett
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=6e5ad25c-3f6d-4f78-b39f-91e0ebdd5fc8@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=Steve.Kang@unisoc.com \
--cc=akpm@linux-foundation.org \
--cc=hailong.liu@oppo.com \
--cc=howlett@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
--cc=sidhartha.kumar@oracle.com \
--cc=stable@kernel.org \
--cc=surenb@google.com \
--cc=willy@infradead.org \
--cc=zhangpeng.00@bytedance.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