watchdog: ignore nohz_full cores in new cpumask
PATCH v2 1/1 watchdog: ignore nohz_full cores in new cpumask
If the nohz_full is enabled, when update watchdog_mask, the nohz_full cores should be ignored.
Signed-off-by Zqiang <[email protected]>
---
v1->v2:
if watchdog_cpumask became empty, set housekeeping_cpumask.
kernel/watchdog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/watchdog.c +3 -1
@@ -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 (); }
Signature · 1 line
2.17.1
Quoted 4 lines · Zqiang
If the
nohz_fullis enabled, when updatewatchdog_mask, thenohz_fullcores should be ignored.Signed-off-by Zqiang <[email protected]>
I don't know, I guess it can still be useful to have the lockup detector available to debug some issues in nohz_full.
Those who override the cpumask should know what they are doing, but you can still print a warning when a nohz_full CPU is included in the range.
Thanks.
Quoted 25 lines
---
v1->v2:
ifwatchdog_cpumaskbecame empty, sethousekeeping_cpumask.kernel/watchdog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)kernel/watchdog.c +3
-1@@ -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 (); }Signature · 1 line
2.17.1