linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] watchdog: ignore nohz_full cores in new cpumask
@ 2021-11-16  6:15 Zqiang
  2021-11-17 17:03 ` Frederic Weisbecker
  0 siblings, 1 reply; 2+ messages in thread
From: Zqiang @ 2021-11-16  6:15 UTC (permalink / raw)
  To: pmladek; +Cc: akpm, frederic, linux-kernel, Zqiang

If the nohz_full is enabled, when update watchdog_mask, the
nohz_full cores should be ignored.

Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
---
 v1->v2:
 if watchdog_cpumask became empty, set housekeeping_cpumask.

 kernel/watchdog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index ad912511a0c0..6f0c5528b399 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -628,7 +628,9 @@ void lockup_detector_soft_poweroff(void)
 static void proc_watchdog_update(void)
 {
 	/* Remove impossible cpus to keep sysctl output clean. */
-	cpumask_and(&watchdog_cpumask, &watchdog_cpumask, cpu_possible_mask);
+	cpumask_and(&watchdog_cpumask, &watchdog_cpumask, housekeeping_cpumask(HK_FLAG_TIMER));
+	if (cpumask_empty(&watchdog_cpumask))
+		cpumask_copy(&watchdog_cpumask, housekeeping_cpumask(HK_FLAG_TIMER));
 	lockup_detector_reconfigure();
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-17 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  6:15 [PATCH V2] watchdog: ignore nohz_full cores in new cpumask Zqiang
2021-11-17 17:03 ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).