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.

test-ww_mutex: Move work to its own UNBOUND workqueue

The test-ww_mutex test already allocates its own workqueue
so be sure to use it for the mtx.work and abba.work rather
then the default system workqueue.

This resolves numerous messages of the sort:
"workqueue: test_abba_work hogged CPU... consider switching to WQ_UNBOUND"
"workqueue: test_mutex_work hogged CPU... consider switching to WQ_UNBOUND"

Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251205013515.759030-3-jstultz@google.com

authored by

John Stultz and committed by
Peter Zijlstra
d327e716 34d80c93

+2 -2
+2 -2
kernel/locking/test-ww_mutex.c
··· 72 72 init_completion(&mtx.done); 73 73 mtx.flags = flags; 74 74 75 - schedule_work(&mtx.work); 75 + queue_work(wq, &mtx.work); 76 76 77 77 wait_for_completion(&mtx.ready); 78 78 ww_mutex_lock(&mtx.mutex, (flags & TEST_MTX_CTX) ? &ctx : NULL); ··· 234 234 abba.trylock = trylock; 235 235 abba.resolve = resolve; 236 236 237 - schedule_work(&abba.work); 237 + queue_work(wq, &abba.work); 238 238 239 239 ww_acquire_init_noinject(&ctx, class); 240 240 if (!trylock)