Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

testing/radix-tree/maple: increase readers and reduce delay for faster machines

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.

Link: https://lkml.kernel.org/r/20250616184521.3382795-2-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <howlett@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Hailong Liu <hailong.liu@oppo.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Liam R. Howlett and committed by
Andrew Morton
f687fd5a fa493f50

+4 -3
+4 -3
tools/testing/radix-tree/maple.c
··· 35062 35062 35063 35063 int i; 35064 35064 void *(*function)(void *); 35065 - pthread_t readers[20]; 35065 + pthread_t readers[30]; 35066 35066 unsigned int index = vals->index; 35067 35067 35068 35068 mt_set_in_rcu(mt); ··· 35080 35080 } 35081 35081 } 35082 35082 35083 - usleep(5); /* small yield to ensure all threads are at least started. */ 35083 + usleep(3); /* small yield to ensure all threads are at least started. */ 35084 35084 35085 35085 while (index <= vals->last) { 35086 35086 mtree_store(mt, index, 35087 35087 (index % 2 ? vals->entry2 : vals->entry3), 35088 35088 GFP_KERNEL); 35089 35089 index++; 35090 - usleep(5); 35090 + usleep(2); 35091 35091 } 35092 35092 35093 35093 while (i--) ··· 35098 35098 MT_BUG_ON(mt, !vals->seen_entry3); 35099 35099 MT_BUG_ON(mt, !vals->seen_both); 35100 35100 } 35101 + 35101 35102 static noinline void __init check_rcu_simulated(struct maple_tree *mt) 35102 35103 { 35103 35104 unsigned long i, nr_entries = 1000;