From nobody Fri Dec 19 17:50:25 2025 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 729392459D7 for ; Fri, 5 Dec 2025 01:35:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764898525; cv=none; b=AFIJ87ZjN6xW6x4lt9kI/SwTstzCCe5k0XJSSYVYcigL62+e/BxKP0dUG9gKj8qkW+otfO1vi3GWmQNewtgzxtzyfHEqhvWEDUAfmAa+LfNAFB9bZhxfSZDjsa28nKCFK0yVuy3UqmWS1HlKKH/ObLXrywYNA7cf2DW9lJ6/SRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764898525; c=relaxed/simple; bh=HlWp//qYPazXx4/ZKXRtyFzwkj8oGixdqikfuGikMnw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=TYgFrC6mFBNLjUrI+naG4TdJECMdOzdu6MDs3jmgsXG8cEABp+g0Dfj6BKA5HMUbjmHfTWiqSz5Q7e0Soy3dVWanNyoZJa+kRmsF/ewWxdqc/R0PCxv2E0bBfLU384MjoNnWr1UUu/LW7HltZC2Wr+o/H/M87cg/Zc1ycO/vEI4= 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=HtmnsMFC; arc=none smtp.client-ip=209.85.216.74 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="HtmnsMFC" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-345b4f2a8e8so2744914a91.1 for ; Thu, 04 Dec 2025 17:35:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764898523; x=1765503323; 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=gNibO24KeJuu0lE1mYqVLUauFcQWMqqglwaPHaV7Lj8=; b=HtmnsMFCdqSW22Ez5/parsSDQEKP9KXS9vzt81K9dbpUcRw7SYQyIUnRUV9tCaQczH bTr0ErypNUsiCb0ZNS0Ca4HIu6G9spGDB+EFQNp0yXsAmuUduj9U0Ol+LxNziPv1a++S w4JeHH5M3AdRNehltTixKMGm3k38vxUgKAY5jNE8KRAek07DbQeX2XK+F0qIKSfGFAQq eA9GCKy+niC1fX4rUPCDACyH/+hPDOHL+tVWBSSz3WYtx2FNVnEt/vDh6OFCXlpqyguR 2o/0M1lbFsODJJfmPFNSNyFC6zmOe4ryryXbw/2dtaSI0IagxWMT4eKVRWx5ZWRbsqZP c6hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764898523; x=1765503323; 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=gNibO24KeJuu0lE1mYqVLUauFcQWMqqglwaPHaV7Lj8=; b=w5GFYd27jzirCSV1Pejffd2InDIBMQSeEBmHJG8ckIX7jJXzKDu099gLyw4Hx2IMG/ g9A38LztAsnWPqO07VYVCNTL1S6lAdKlreS3JmVwJSgroRJmhCXV5TrcBoyaR+msFMtw s2lIulxMBFKze8B1phfgAj00Ac0iIdmjQMM7KWz82dlcBPf8IfitzyArGCM11EXkMSQn TOUKrTyegBX2NjLJqV+C78UdoLH0eOn2FN9ue1paHjOH1MpCOFk7HiV2PjlM2gcuzoaB Z+NwB+HCr3WLu92CXBF4T6cbeREXvVaevhi+iY0XxjJ2QwD0CP4Njc1Bzu2kwSHnevaj FcIA== X-Gm-Message-State: AOJu0Yy35xBivDPapJ5d4LtKUMvBH0JNVBO1PanrWqW5yjD85sBngSDm 01apiUpQ5Mhxp+hTY/pYJXTopcBljtCqg3nH4ZOczx8PwnSeQTg/AGM78pzQ3izIeX3taEfQFCu kb62RFmoZ85T5/uLI3HVSWR+50ClfPBaBP7THXMsRG+6TQ2u7asAg9vPpJet4HGrfnfd+YJQfpF v/MSzwze8ZNB2l7blt3KrOyKFQpqBu8nGPY8ZP0jkD7XJe8lqb X-Google-Smtp-Source: AGHT+IEBTLcJWgNhV+3ahJMm/XW2lJhTreF8zRr8ofoQcOHpX9SL2VohiLGsTkEfSxRIJMaOigfUVsDBlH0e X-Received: from pjzh9.prod.google.com ([2002:a17:90a:ea89:b0:340:bb52:b060]) (user=jstultz job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3d0f:b0:340:bde5:c9e3 with SMTP id 98e67ed59e1d1-349126c863fmr8472580a91.23.1764898522529; Thu, 04 Dec 2025 17:35:22 -0800 (PST) Date: Fri, 5 Dec 2025 01:35:10 +0000 In-Reply-To: <20251205013515.759030-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: <20251205013515.759030-1-jstultz@google.com> X-Mailer: git-send-email 2.52.0.223.gf5cc29aaa4-goog Message-ID: <20251205013515.759030-3-jstultz@google.com> Subject: [RESEND x5][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.223.gf5cc29aaa4-goog