Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752470AbdIAQos (ORCPT ); Fri, 1 Sep 2017 12:44:48 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34380 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbdIAQmB (ORCPT ); Fri, 1 Sep 2017 12:42:01 -0400 X-Google-Smtp-Source: ADKCNb7u8X5NiZF6UpJn+vGOZzdv5eQEdSI9uUlba7P9wW9sI7ec1NrkZ1acf/PbjPDkl0wRY14jFw== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Ingo Molnar , Mike Galbraith , Rik van Riel , Wanpeng Li Subject: [PATCH 02/12] watchdog: Use housekeeping_cpumask() instead of ad-hoc version Date: Fri, 1 Sep 2017 18:41:37 +0200 Message-Id: <1504284108-6157-3-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504284108-6157-1-git-send-email-fweisbec@gmail.com> References: <1504284108-6157-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: 1401 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 7a9df162..cdd0d11 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -941,15 +941,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