Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbbDBSQ1 (ORCPT ); Thu, 2 Apr 2015 14:16:27 -0400 Received: from mail-am1on0076.outbound.protection.outlook.com ([157.56.112.76]:2695 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751688AbbDBSQZ (ORCPT ); Thu, 2 Apr 2015 14:16:25 -0400 X-Greylist: delayed 2181 seconds by postgrey-1.27 at vger.kernel.org; Thu, 02 Apr 2015 14:16:24 EDT Message-ID: <551D8769.5030100@ezchip.com> Date: Thu, 2 Apr 2015 14:16:09 -0400 From: Chris Metcalf User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Frederic Weisbecker , Don Zickus , Ingo Molnar , Andrew Morton , Andrew Jones , chai wen , Ulrich Obergfell , Fabian Frederick , Aaron Tomlin , Ben Zhang , Christoph Lameter , Gilad Ben-Yossef , Steven Rostedt , , Jonathan Corbet , Subject: Re: [PATCH v3] watchdog: add watchdog_cpumask sysctl to assist nohz References: <1427741465-15747-1-git-send-email-cmetcalf@ezchip.com> <20150331072502.GA16754@gmail.com> <551AE7D4.3020608@ezchip.com> <20150402133502.GA175361@redhat.com> <551D48F9.6090101@ezchip.com> <20150402141527.GD175361@redhat.com> <20150402153827.GC10357@lerouge> <551D6373.2030000@ezchip.com> <20150402164845.GD10357@lerouge> <1427996368-2199-1-git-send-email-cmetcalf@ezchip.com> <20150402180626.GG23123@twins.programming.kicks-ass.net> In-Reply-To: <20150402180626.GG23123@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: BN1PR12CA0029.namprd12.prod.outlook.com (25.160.77.39) To AM2PR02MB0771.eurprd02.prod.outlook.com (25.163.146.156) Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0771; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10009020)(6009001)(6049001)(24454002)(479174004)(377454003)(51704005)(59896002)(50466002)(86362001)(36756003)(77096005)(64126003)(76176999)(50986999)(54356999)(122386002)(33656002)(2950100001)(46102003)(47776003)(77156002)(66066001)(15975445007)(62966003)(83506001)(110136001)(87976001)(93886004)(23746002)(65816999)(87266999)(92566002)(42186005)(19580395003)(80316001)(19580405001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR02MB0771;H:[10.7.0.41];FPR:;SPF:None;MLV:sfv;LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:AM2PR02MB0771;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0771; X-Forefront-PRVS: 0534947130 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2015 18:16:19.7884 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB0771 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1254 Lines: 31 On 04/02/2015 02:06 PM, Peter Zijlstra wrote: > On Thu, Apr 02, 2015 at 01:39:28PM -0400, cmetcalf@ezchip.com wrote: >> @@ -431,6 +434,10 @@ static void watchdog_enable(unsigned int cpu) >> hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); >> hrtimer->function = watchdog_timer_fn; >> >> + /* Exit if the cpu is not allowed for watchdog. */ >> + if (!cpumask_test_cpu(cpu, watchdog_mask)) >> + do_exit(0); >> + > Ick, that doesn't look right for smpboot threads. I didn't see a better way to make this happen without adding a bunch of infrastructure to the smpboot thread mechanism to use a cpumask other than for_each_online_cpu(). The exit seems benign in my testing, but I agree it's not the cleanest way to express what we're trying to do here. Perhaps something like an optional cpumask_t pointer in struct smp_hotplug_thread, which if present specifies the cpus to run on, and otherwise we stick with cpu_online_mask? -- Chris Metcalf, EZChip Semiconductor http://www.ezchip.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/