locking: Reduce the number of locks in ww_mutex stress tests
authorBoqun Feng <boqun.feng@gmail.com>
Sun, 12 Mar 2023 19:04:48 +0000 (12:04 -0700)
committerBoqun Feng <boqun.feng@gmail.com>
Mon, 27 Mar 2023 18:16:01 +0000 (11:16 -0700)
The stress test in test_ww_mutex_init() uses 4095 locks since
lockdep::reference has 12 bits, and since we are going to reduce it to
11 bits to support lock_sync(), and 2047 is still a reasonable number of
the max nesting level for locks, so adjust the test.

Reported-by: kernel test robot <oliver.sang@intel.com>
Link: https://lore.kernel.org/oe-lkp/202302011445.9d99dae2-oliver.sang@intel.com
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
kernel/locking/test-ww_mutex.c

index 29dc253d03af7c1c6f5f2c47694b842ac744fdab..93cca6e698600ac798a8968b95b1e94ae9380126 100644 (file)
@@ -659,7 +659,7 @@ static int __init test_ww_mutex_init(void)
        if (ret)
                return ret;
 
-       ret = stress(4095, hweight32(STRESS_ALL)*ncpus, STRESS_ALL);
+       ret = stress(2047, hweight32(STRESS_ALL)*ncpus, STRESS_ALL);
        if (ret)
                return ret;