]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
testing/raix-tree/maple: Increase readers and reduce delay for faster machines
authorLiam R. Howlett <howlett@gmail.com>
Mon, 27 Jan 2025 20:59:53 +0000 (15:59 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 4 Mar 2025 16:13:20 +0000 (11:13 -0500)
Add more threads and reduce the timing of the readers to increase the
possibility of catching the rcu changes.  The test does not pass unless
the reader is seen.

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
tools/testing/radix-tree/maple.c

index dc8e40b94c3f757fad4509293526e81bf6758d08..3717d76f8f0ac1a50aff163e95188698b53acfcf 100644 (file)
@@ -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);
        }
 
        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;