From: Christoph Lameter <[email protected]>

watchdog checks can only run on housekeeping capable cpus. Otherwise
we will be generating noise that we would like to avoid on the isolated
processors.

Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Chris Metcalf <[email protected]>
  [line-wrapped and added equivalent fix in clocksource_start_watchdog()]
---
 kernel/time/clocksource.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 6a5a310a1a53..b9c79c96d069 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -269,9 +269,12 @@ static void clocksource_watchdog(unsigned long data)
         * Cycle through CPUs to check if the CPUs stay synchronized
         * to each other.
         */
-       next_cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask);
+       next_cpu = cpumask_next_and(raw_smp_processor_id(), cpu_online_mask,
+                                   housekeeping_cpumask());
        if (next_cpu >= nr_cpu_ids)
-               next_cpu = cpumask_first(cpu_online_mask);
+               next_cpu = cpumask_first_and(cpu_online_mask,
+                                            housekeeping_cpumask());
+
        watchdog_timer.expires += WATCHDOG_INTERVAL;
        add_timer_on(&watchdog_timer, next_cpu);
 out:
@@ -285,7 +288,8 @@ static inline void clocksource_start_watchdog(void)
        init_timer(&watchdog_timer);
        watchdog_timer.function = clocksource_watchdog;
        watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
-       add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask));
+       add_timer_on(&watchdog_timer,
+                    cpumask_first_and(cpu_online_mask, 
housekeeping_cpumask()));
        watchdog_running = 1;
 }
 
-- 
2.7.2

Reply via email to