From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbbC3Svi (ORCPT ); Mon, 30 Mar 2015 14:51:38 -0400 Received: from mail-am1on0072.outbound.protection.outlook.com ([157.56.112.72]:15966 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752933AbbC3Svg (ORCPT ); Mon, 30 Mar 2015 14:51:36 -0400 From: To: Andrew Morton , Don Zickus , Andrew Jones , chai wen , Ingo Molnar , Ulrich Obergfell , Fabian Frederick , Aaron Tomlin , Ben Zhang , Christoph Lameter , Frederic Weisbecker , Gilad Ben-Yossef , Steven Rostedt , open list CC: Chris Metcalf Subject: [PATCH] watchdog: nohz: don't run watchdog on nohz_full cores Date: Mon, 30 Mar 2015 14:51:05 -0400 Message-ID: <1427741465-15747-1-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 X-EOPAttributedMessage: 0 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=cmetcalf@ezchip.com; ezchip.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:12.216.194.146;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10009020)(6009001)(339900001)(199003)(189002)(50466002)(50226001)(33646002)(87936001)(19580405001)(85426001)(19580395003)(48376002)(6806004)(36756003)(105606002)(106466001)(50986999)(92566002)(62966003)(86362001)(229853001)(46102003)(42186005)(86152002)(77156002)(104016003)(9376004)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR02MB0535;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB0535; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:AM3PR02MB0535;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB0535; X-Forefront-PRVS: 05315CBE52 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2015 18:51:31.7966 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3;Ip=[12.216.194.146];Helo=[ld-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR02MB0535 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Metcalf Running watchdog can be a helpful debugging feature on regular cores, but it's incompatible with nohz_full, since it forces regular scheduling events. Accordingly, just exit out immediately from any nohz_full core. An alternate approach would be to add a flags field or function to smp_hotplug_thread to control on which cores the percpu threads are created, but it wasn't clear that much mechanism was useful. Signed-off-by: Chris Metcalf --- kernel/watchdog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 3174bf8e3538..8a46d9d8a66f 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -431,6 +432,10 @@ static void watchdog_enable(unsigned int cpu) hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); hrtimer->function = watchdog_timer_fn; + /* nohz_full cpus do not do watchdog checking. */ + if (tick_nohz_full_cpu(cpu)) + do_exit(0); + /* Enable the perf event */ watchdog_nmi_enable(cpu); -- 2.1.2