watchdog: ignore nohz_full cores in new cpumask
PATCH 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.
--- 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)) +return ;lockup_detector_reconfigure (); }
Signature · 1 line
2.17.1
Quoted 13 lines · Zqiang
If the
nohz_fullis enabled, when updatewatchdog_mask, thenohz_fullcores should be ignored.Signed-off-by Zqiang <[email protected]>--- kernel/watchdog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)kernel/watchdog.c +0
-0
kernel/watchdog.c void lockup_detector_soft_poweroff(void) · line 632
Quoted 6 lines
kernel/watchdog.c +1
-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 ));
I am not familiar with nozh_full code but this looks fine.
kernel/watchdog.c void lockup_detector_soft_poweroff(void) · line 633
Quoted 2 lines
kernel/watchdog.c +2
-0+if (cpumask_empty (&watchdog_cpumask)) +return ;
But this looks looks wrong. Is there any reason for this?
We need to stop the watchdog when it was running before.
I mean that lockup_detector_reconfigure() must be called anytime when the mask has changed even when it became empty.
kernel/watchdog.c void lockup_detector_soft_poweroff(void) · line 635
Quoted 2 lines
kernel/watchdog.c +0
-0lockup_detector_reconfigure (); }
Best Regards,
Petr
Quoted 23 lines · Petr Mladek
Quoted 13 lines · Zqiang
If the
nohz_fullis enabled, when updatewatchdog_mask, thenohz_fullcores should be ignored.Signed-off-by Zqiang <[email protected]>--- kernel/watchdog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)kernel/watchdog.c +0
-0kernel/watchdog.c void lockup_detector_soft_poweroff(void) · line 632
Quoted 6 lines
kernel/watchdog.c +1
-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 ));I am not familiar with
nozh_fullcode but this looks fine.
Quoted 8 lines
kernel/watchdog.c void lockup_detector_soft_poweroff(void) · line 633
Quoted 2 lines
kernel/watchdog.c +2
-0+if (cpumask_empty (&watchdog_cpumask)) +return ;But this looks looks wrong. Is there any reason for this?
We need to stop the watchdog when it was running before.
I mean that
lockup_detector_reconfigure()must be called anytime when the mask has changed even when it became empty.
Thanks Petr
I will resend patch v2.
Quoted 6 lines
kernel/watchdog.c void lockup_detector_soft_poweroff(void) · line 635
Quoted 4 lines
kernel/watchdog.c +0
-0lockup_detector_reconfigure (); }Best Regards,
Petr