summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorJoel Fernandes <joelagnelf@nvidia.com>2026-07-18 13:15:37 -0400
committerPaul E. McKenney <paulmck@kernel.org>2026-07-23 10:39:57 -0700
commit8b5b048277e2c43b9012f0196f4097c4e92025a1 (patch)
tree417e936eaad9a839ef7eeb67a4be218e7dfc6fb8 /tools/testing
parent34ff636f322c6d5e4f0a52338fa63a7dff09a495 (diff)
downloadlinux-next-8b5b048277e2c43b9012f0196f4097c4e92025a1.tar.gz
linux-next-8b5b048277e2c43b9012f0196f4097c4e92025a1.zip
scftorture: Make invoker threads actually wait for all threads to start
Each scftorture_invoker() thread decrements n_started, which is initialized to the number of threads, and is then supposed to wait until all of its siblings have also checked in before starting the test proper. However, the wait loop is guarded by !atomic_dec_return(&n_started), which is true only for the final thread to arrive, and by then n_started is already zero, so the final thread does not wait either. The side-effect (possibly positive) is that no thread ever waits and the start-synchronization barrier is dead code, with early threads beginning to hammer smp_call_function*() while later threads are still being spawned. Invert the test so that every thread other than the last spins until n_started reaches zero, making the threads start testing together as intended. The existing torture_must_stop() check in the wait loop continues to bound the wait during shutdown. We can also drop the spinning entirely if the intent is to leave it as dead code, however for the current intent, this patches fixes the code. Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions