From nobody Mon Feb 9 07:55:23 2026 Received: from mail-dl1-f53.google.com (mail-dl1-f53.google.com [74.125.82.53]) (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 A08EC30AACF for ; Fri, 6 Feb 2026 07:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770361565; cv=none; b=lynXEJiMHL0TecZHeDYpRJ8nOk57ThqXIRc5WDPZjxr2TKsYwGT6Nr2gFktXG3XLtsenPcu9257UfkvPDPPJ1WmLr3u7Sa7lJPZXfPk/uwZSpiJ4TihyNTS6PXH5x28LpJtrN83Fq4jYRKUY+5YH2CPdIZSiY9xexP6nCL+Alxo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770361565; c=relaxed/simple; bh=tKwD7qZPuORYanqCCrKMgXQf9MbzZVnLfxvUTl58kmQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iD+4cv+BVq+jMRnYg5wt2o7OXXnlwm1QEATDKNLeQGQNu3IiLO2gGml0aj7za6GBF44iFvEaRkQlN60tavSCobKAW06OIegZclEcWj5S1/ChuoBS6U3aEljx9cM2xL7RrlxnJgCqatnACl1iNS61ooYVawb+RTZWvWCj6AVKDFE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PkkVhdfk; arc=none smtp.client-ip=74.125.82.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PkkVhdfk" Received: by mail-dl1-f53.google.com with SMTP id a92af1059eb24-124566b6693so976664c88.0 for ; Thu, 05 Feb 2026 23:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770361565; x=1770966365; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BX9sMLwwZBpxhdeadTLxD2L+ATZYvXDyrtJH+GXz33A=; b=PkkVhdfkETCDWRf5XDCJsQLAHWp7ttHONZsKz90x1XM12xlxSYsRKEEReePcfqV7WV 1X8/t0eJ8bmIJaDm3yGFjjc2lyLveetZM43z0qufNerLPhH07gf46ZCyuuWqlcd4wWxv cisMFoOsoHeBtPlj72Z2HiLfWX6wZ2kd7NwpInWR2MyKqA8T8Ejrdplro7l1KAbt6ti+ yS3l/uiOhTyIIc+k+V1Hew9PixsbfWGiO/NY+3mKH1spStzp586c+u8hReHrWeAFnGf+ uS2T1cfWgZ6G0JZXcJukgqDRwmfEIb0fS9z/31B/KVB+J2qCObvS3Fbdyorjm4unCloP lZBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770361565; x=1770966365; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=BX9sMLwwZBpxhdeadTLxD2L+ATZYvXDyrtJH+GXz33A=; b=eRhOJFeQ84EehTDDeRuvBHfpoITdLyP5FQH81yhv8jXzoTMDe6cgHSINSoitT3Rf5R jd/vUioVTvv3H1OLcETMLo6s0QGf0svCG3VExjNIOb6bObqfFpnpNJOTKWxA9k6l4KpY dK7INtiIApLlYdhd91J6oahipFuS9nYd7DkYEyC66wIR29Z/TzchPt7qYIsv0JkJDME+ BV2xjktKOpIWFDXWUHLyhAn6Kyb5qM+FzL2I57kyqWeehCfdQoq74bMFyN936JAT17NR agTgrtxndjyhkecNzv7kxLC6KazIO0bmkRIkaJSgNPfhBYTOgH4i69fhOM95BvcrxdVu T+CA== X-Gm-Message-State: AOJu0YxGqbIxBxegudvBysQn0jfleBrKayX/+F/uvtQpNoTHwtmGiNIC eoTGE6noNu7+cccfr16MbWd4cnDIe4gGGDaxNqRpWfZp94cka3Y6Mein X-Gm-Gg: AZuq6aI5sOjJjmsz9HGAfNSY4a1BWbxLbTDZrxX6tQ7ga+uY3u6iBD8CdAEEcTJYCs3 9gBCqmHdgsNrj9XnaZ+CjF/fJw7SAbZFr5lM2dNYyEIv+/6deT/Edv5RHFUzaXse0ZRuEzIvuHO /0z5bvQkFSiYMYkE//3icaE+hKyi9Dl1qdRR5vcUlczAe/4z/PCSQBvzL32Ea6ldkgXMOPA1Fhq qbLlvkHGeQr8jTzu44AxXdciBLbDogZB9VMQQKv9kSN1NiWxriRnJyxA5lsBZD8Jmi2VV8ygwDg g4Nc+eARb67xX2X/UeYj+hMdC+r782qOG5WEx2N0AXToTK9Tz5tdcxAjy/krdc2SCuKhAVY9EXB 1gr/m/GuaJIIaV/6aJYU7+IeKALFhH0MHptDoF6SrKBS2RUhkHG7w13EsBTG9PhZucPUBDyOt0M fahg89xgyDzQ== X-Received: by 2002:a05:7022:619e:b0:11d:f890:6751 with SMTP id a92af1059eb24-12703fd8b47mr1055311c88.10.1770361564656; Thu, 05 Feb 2026 23:06:04 -0800 (PST) Received: from [127.0.1.1] ([74.48.213.230]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-127041e61b9sm1592601c88.8.2026.02.05.23.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 23:06:04 -0800 (PST) From: Qiliang Yuan Date: Fri, 06 Feb 2026 02:04:27 -0500 Subject: [PATCH RFC 06/12] watchdog: Allow runtime toggle of hardlockup detector on CPUs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260206-feature-dynamic_isolcpus_dhei-v1-6-00a711eb0c74@gmail.com> References: <20260206-feature-dynamic_isolcpus_dhei-v1-0-00a711eb0c74@gmail.com> In-Reply-To: <20260206-feature-dynamic_isolcpus_dhei-v1-0-00a711eb0c74@gmail.com> To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Thomas Gleixner , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Tejun Heo , Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Anna-Maria Behnsen , Ingo Molnar Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, linux-mm@kvack.org, Qiliang Yuan , Qiliang Yuan X-Mailer: b4 0.14.3 The lockup detector (watchdog) affinity is initially set based on the HK_TYPE_TIMER housekeeping mask. However, if this mask is updated at runtime, the watchdog threads remain on their original CPUs. Register a housekeeping notifier to update watchdog_cpumask and trigger a reconfiguration via proc_watchdog_update() when the HK_TYPE_TIMER housekeeping mask changes. This ensures that watchdog threads are synchronized with the new isolation boundaries. Signed-off-by: Qiliang Yuan Signed-off-by: Qiliang Yuan --- kernel/watchdog.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 366122f4a0f8..2922d7f93d61 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -26,6 +26,7 @@ #include #include #include +#include =20 #include #include @@ -1359,6 +1360,28 @@ static int __init lockup_detector_check(void) } late_initcall_sync(lockup_detector_check); =20 +static int watchdog_housekeeping_reconfigure(struct notifier_block *nb, + unsigned long action, void *data) +{ + if (action =3D=3D HK_UPDATE_MASK) { + unsigned int type =3D (unsigned long)data; + + if (type =3D=3D HK_TYPE_TIMER) { + mutex_lock(&watchdog_mutex); + cpumask_copy(&watchdog_cpumask, + housekeeping_cpumask(HK_TYPE_TIMER)); + proc_watchdog_update(false); + mutex_unlock(&watchdog_mutex); + } + } + + return NOTIFY_OK; +} + +static struct notifier_block watchdog_housekeeping_nb =3D { + .notifier_call =3D watchdog_housekeeping_reconfigure, +}; + void __init lockup_detector_init(void) { if (tick_nohz_full_enabled()) @@ -1373,4 +1396,5 @@ void __init lockup_detector_init(void) allow_lockup_detector_init_retry =3D true; =20 lockup_detector_setup(); + housekeeping_register_notifier(&watchdog_housekeeping_nb); } --=20 2.51.0