From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932656AbcHIUb3 (ORCPT ); Tue, 9 Aug 2016 16:31:29 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:57415 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932478AbcHIUaT (ORCPT ); Tue, 9 Aug 2016 16:30:19 -0400 From: Chris Metcalf To: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , Rik van Riel , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Chris Metcalf Subject: [PATCH v14 11/14] clocksource: Do not schedule watchdog on isolated or NOHZ cpus Date: Tue, 9 Aug 2016 16:29:53 -0400 Message-Id: <1470774596-17341-12-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1470774596-17341-1-git-send-email-cmetcalf@mellanox.com> References: <1470774596-17341-1-git-send-email-cmetcalf@mellanox.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Lameter 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 Signed-off-by: Chris Metcalf [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