From nobody Tue Dec 2 02:58:56 2025 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 006BD2F49EF for ; Tue, 18 Nov 2025 00:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763427536; cv=none; b=pvd1g0/0EeTnw8/CXW3d0nkAX4X5dBUb3HTqeQwim0OFkY/AhDPcHb6X0sW2grTzBhrBX9SaUb16wNl6U1885AB0RZNlExUsI5fzgutARaIvqkSPeeRJ1LXeJatEW6V+e4EGZfMSHnf0HcdUK376ICJo1afJi8z7rJ/z79NaWOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763427536; c=relaxed/simple; bh=9uCjmsVJlgRuTrmPs2raK8kdcDL3jRjX+PF7SRJLhRk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=avx8vDUMH1TEJZCilQiIYu0stcMSBz+zfDlG8QFL89FBpK/a6Uc+RLqU/ton0SpJkfHC1RpnK3a9TY9JEBnzSvP5mgtfISiX981RVCCaMsv7MDcZDWDZRbvA+pCtRjMR0Kv8Catz+S5ggdmxfv7qURe0QYHdTI1j4hQYUXiJro8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jstultz.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=z4jlpqd8; arc=none smtp.client-ip=209.85.210.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jstultz.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="z4jlpqd8" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-7bb2303fe94so4047996b3a.3 for ; Mon, 17 Nov 2025 16:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763427534; x=1764032334; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=NBxRf2wtLdLE8Skv8eCm0JMvzZuD+zdUaznpa5o+LWs=; b=z4jlpqd8Oj+tzRJ3urtlxwy3Bu43eikZ/4djQy40d1q5R5AMQ2ldlawvDXFz8Ho6Tu DpUw2qj4XScT8WGLnjmaLMSguSSfF3bn0A+z31CsBqq3KS5gsWpsevwIdtktmQp2IR9o ORJ01ZevSxXlkbIOzENdY8kYTgeL2D+FCdDOeV56+Jm19t1G35iqBw9LRoBjLorQqJg1 ebKq9msn4jGrVUDIk2tq6mYKe+BeDOGQFIsTuRkn1qhreGx4ZnI07+Kc+rZFPlk10SCo W4uZLGsERp9xZvLY0TAFTXSQs23uny3nRKqci1a+YXpZwayYpX5SsJsBWEqezXCOU31C 6sVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763427534; x=1764032334; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NBxRf2wtLdLE8Skv8eCm0JMvzZuD+zdUaznpa5o+LWs=; b=oFLJBqPTa26FHaQUVQubm3OUNS334fQd5VBr8HpkWlXMuc82xeH5F+ukT801cBdr28 4HShp6D+gmXjnGZadrkZzbfo+5S2CYUdNDUyS6P3z/DzqJPFEvgEyIL82qkb93y4FcCk nsL6G+K+f5AXxVuwlyx4xW3M4zHmR/NGCh713ceX/80I7aiob0no+nASX7yLuuqezWyy 7wITLl2Iely46yNV+LHfSVOVc2Mk46HqeSMOcz18+89Vr4AB78RPHSU0sewZwP+eJBgc OmVoapt9g4L99J46OTk16ML2tzXGXBLmaQConjobzQ36rMFArdcY1ckidpQi5fV/R/L4 c+jg== X-Gm-Message-State: AOJu0YyFFD0zZ6j+4ycXqOAnwIpW7nWcgOI1YsKW0dJFJtyb9utAqOu7 CV0qH23B6kD/JWyhknyWeT2PrILRJ/4cgWzA3VdXhX0MWXci4rx2lFcPGe2pKrgA8z4ezVZv6aK Xtrj9caREnh5tUA9780NOosn93a3yJVzi2BGMdv3UelDQyhgX7Ox0a2BMQkVs0by0AIl40JURVg ueERgllzHx5xdHx4qwTUNI3C8bTxfF2Xv4NCBrBbLMrEzLCGSk X-Google-Smtp-Source: AGHT+IFD1ljpXbD0VDwxFZxKfyx+2BVmpwkAJoneSyAaJWscjC6ElEBwuwkP6u1Np2g/Xq2Ljd4/GJ9QuDam X-Received: from pfjj8.prod.google.com ([2002:a05:6a00:2348:b0:7b8:282e:c971]) (user=jstultz job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2d1e:b0:7b8:c7f7:645e with SMTP id d2e1a72fcca58-7ba3c07eeebmr19923121b3a.17.1763427533761; Mon, 17 Nov 2025 16:58:53 -0800 (PST) Date: Tue, 18 Nov 2025 00:58:35 +0000 In-Reply-To: <20251118005843.3902476-1-jstultz@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251118005843.3902476-1-jstultz@google.com> X-Mailer: git-send-email 2.52.0.rc1.455.g30608eb744-goog Message-ID: <20251118005843.3902476-3-jstultz@google.com> Subject: [RESEND x4][PATCH 2/3] test-ww_mutex: Move work to its own UNBOUND workqueue From: John Stultz To: LKML Cc: John Stultz , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , "Paul E . McKenney" , Joel Fernandes , Dietmar Eggemann , Suleiman Souhlal , kernel-team@android.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: "Paul E . McKenney" Cc: Joel Fernandes Cc: Dietmar Eggemann Cc: Suleiman Souhlal Cc: kernel-team@android.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 d27aaaa860a36..30512b3e95c99 100644 --- a/kernel/locking/test-ww_mutex.c +++ b/kernel/locking/test-ww_mutex.c @@ -72,7 +72,7 @@ static int __test_mutex(struct ww_class *class, unsigned = int flags) init_completion(&mtx.done); mtx.flags =3D flags; =20 - schedule_work(&mtx.work); + queue_work(wq, &mtx.work); =20 wait_for_completion(&mtx.ready); ww_mutex_lock(&mtx.mutex, (flags & TEST_MTX_CTX) ? &ctx : NULL); @@ -234,7 +234,7 @@ static int test_abba(struct ww_class *class, bool trylo= ck, bool resolve) abba.trylock =3D trylock; abba.resolve =3D resolve; =20 - schedule_work(&abba.work); + queue_work(wq, &abba.work); =20 ww_acquire_init_noinject(&ctx, class); if (!trylock) --=20 2.52.0.rc1.455.g30608eb744-goog