Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932842AbdIRNyX (ORCPT ); Mon, 18 Sep 2017 09:54:23 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35415 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932829AbdIRNyV (ORCPT ); Mon, 18 Sep 2017 09:54:21 -0400 X-Google-Smtp-Source: AOwi7QCY+Nivc4lSoCOoVq2NvXuo83AyPuioQZsX513fO5CFMFDOeN5lZNuqVygSb4dqRcWm2UPisg== From: Frederic Weisbecker To: Ingo Molnar Cc: LKML , Frederic Weisbecker , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Mike Galbraith , Rik van Riel , Wanpeng Li Subject: [PATCH 02/12] watchdog: Use housekeeping_cpumask() instead of ad-hoc version Date: Mon, 18 Sep 2017 15:53:59 +0200 Message-Id: <1505742849-30473-3-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505742849-30473-1-git-send-email-fweisbec@gmail.com> References: <1505742849-30473-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1400 Lines: 44 While trying to disable the watchog on nohz_full CPUs, the watchdog implements an ad-hoc version of housekeeping_cpumask(). Lets replace those re-invented lines. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Rik van Riel Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Mike Galbraith Cc: Ingo Molnar Cc: Christoph Lameter Cc: Paul E. McKenney Cc: Wanpeng Li Cc: Luiz Capitulino --- kernel/watchdog.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 3cc5596..e672752 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -942,15 +942,10 @@ void __init lockup_detector_init(void) { set_sample_period(); -#ifdef CONFIG_NO_HZ_FULL - if (tick_nohz_full_enabled()) { + if (tick_nohz_full_enabled()) pr_info("Disabling watchdog on nohz_full cores by default\n"); - cpumask_copy(&watchdog_cpumask, housekeeping_mask); - } else - cpumask_copy(&watchdog_cpumask, cpu_possible_mask); -#else - cpumask_copy(&watchdog_cpumask, cpu_possible_mask); -#endif + + cpumask_copy(&watchdog_cpumask, housekeeping_cpumask()); if (watchdog_enabled) watchdog_enable_all_cpus(); -- 2.7.4