lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e5ad25c-3f6d-4f78-b39f-91e0ebdd5fc8@lucifer.local>
Date: Fri, 20 Jun 2025 16:43:19 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, maple-tree@...ts.infradead.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org, stable@...nel.org,
        Suren Baghdasaryan <surenb@...gle.com>,
        Hailong Liu <hailong.liu@...o.com>, zhangpeng.00@...edance.com,
        Steve Kang <Steve.Kang@...soc.com>,
        Matthew Wilcox <willy@...radead.org>,
        Sidhartha Kumar <sidhartha.kumar@...cle.com>,
        "Liam R. Howlett" <howlett@...il.com>
Subject: Re: [PATCH 1/3] testing/raix-tree/maple: Increase readers and reduce
 delay for faster machines

On Mon, Jun 16, 2025 at 02:45:19PM -0400, Liam R. Howlett wrote:
> From: "Liam R. Howlett" <howlett@...il.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@...il.com>

Seems reasonable so:

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ