[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250623220221.978054-2-jstultz@google.com>
Date: Mon, 23 Jun 2025 22:02:18 +0000
From: John Stultz <jstultz@...gle.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: John Stultz <jstultz@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>, Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>, "Paul E . McKenney" <paulmck@...nel.org>,
Joel Fernandes <joelagnelf@...dia.com>, Dietmar Eggemann <dietmar.eggemann@....com>,
Suleiman Souhlal <suleiman@...gle.com>, kernel-team@...roid.com
Subject: [PATCH 2/2] 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@...gle.com>
---
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Will Deacon <will@...nel.org>
Cc: Waiman Long <longman@...hat.com>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: "Paul E . McKenney" <paulmck@...nel.org>
Cc: Joel Fernandes <joelagnelf@...dia.com>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: Suleiman Souhlal <suleiman@...gle.com>
Cc: kernel-team@...roid.com
---
kernel/locking/test-ww_mutex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c
index cc0d2e59049a8..d7c3f7f533f42 100644
--- a/kernel/locking/test-ww_mutex.c
+++ b/kernel/locking/test-ww_mutex.c
@@ -70,7 +70,7 @@ static int __test_mutex(unsigned int flags)
init_completion(&mtx.done);
mtx.flags = flags;
- schedule_work(&mtx.work);
+ queue_work(wq, &mtx.work);
wait_for_completion(&mtx.ready);
ww_mutex_lock(&mtx.mutex, (flags & TEST_MTX_CTX) ? &ctx : NULL);
@@ -229,7 +229,7 @@ static int test_abba(bool trylock, bool resolve)
abba.trylock = trylock;
abba.resolve = resolve;
- schedule_work(&abba.work);
+ queue_work(wq, &abba.work);
ww_acquire_init_noinject(&ctx, &ww_class);
if (!trylock)
--
2.50.0.727.gbf7dc18ff4-goog
Powered by blists - more mailing lists