lkml.org 
[lkml]   [2016]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v14 11/14] clocksource: Do not schedule watchdog on isolated or NOHZ cpus
Date
From: Christoph Lameter <cl@linux.com>

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 <cl@linux.com>
Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
[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
\
 
 \ /
  Last update: 2016-08-09 23:01    [W:0.246 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site