Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755934AbbDIRYg (ORCPT ); Thu, 9 Apr 2015 13:24:36 -0400 Received: from mail-am1on0055.outbound.protection.outlook.com ([157.56.112.55]:21440 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753531AbbDIRYf (ORCPT ); Thu, 9 Apr 2015 13:24:35 -0400 Message-ID: <5526B5C6.6010202@ezchip.com> Date: Thu, 9 Apr 2015 13:24:22 -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 , "Paul E. McKenney" , "Rafael J. Wysocki" , Martin Schwidefsky , Ingo Molnar , Subject: Re: [PATCH v4 1/2] nohz: add tick_nohz_full_cpumask_or() and _andnot() APIs References: <20150409082921.GP27490@worktop.programming.kicks-ass.net> <1428598839-24296-1-git-send-email-cmetcalf@ezchip.com> <20150409170733.GR21418@twins.programming.kicks-ass.net> In-Reply-To: <20150409170733.GR21418@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: BLUPR07CA0045.namprd07.prod.outlook.com (10.255.223.158) To VI1PR02MB0783.eurprd02.prod.outlook.com (25.162.14.145) Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0783;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0639; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10009020)(6049001)(6009001)(24454002)(51704005)(377454003)(479174004)(87266999)(33656002)(65806001)(42186005)(92566002)(77156002)(36756003)(46102003)(50986999)(110136001)(83506001)(76176999)(65816999)(80316001)(19580395003)(54356999)(47776003)(122386002)(23746002)(65956001)(15975445007)(66066001)(87976001)(2950100001)(62966003)(59896002)(86362001)(50466002)(40100003)(77096005)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR02MB0783;H:[10.7.0.41];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:VI1PR02MB0783;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0783; X-Forefront-PRVS: 0541031FF6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2015 17:24:31.5073 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB0783 X-OriginatorOrg: ezchip.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1880 Lines: 57 On 04/09/2015 01:07 PM, Peter Zijlstra wrote: > On Thu, Apr 09, 2015 at 01:00:38PM -0400, Chris Metcalf wrote: >> +static inline void tick_nohz_full_cpumask_or(struct cpumask *mask) > This still reads as if you're doing: nohz_full_mask |= mask. > > I think the suggestion done by Frederic is the right one, reverse the > lot, have: > > isolcpu_map_or(nohz_full_map) := isolcpus_map |= nohz_full_map > > Or just completely give up and just write readable code under an #ifdef. OK, so let's go with v5 (in the other thread) plus comments on init ordering, then. I'll repost that shortly. However, I'd still appreciate guidance on the naming, since I do have a patch outstanding to fiddle with cpumasks for nohz_full (in the other case, for the tilegx network driver irq mask). So here's the obvious readable code snippet approach: #ifdef CONFIG_NO_HZ_FULL cpumask_or(some_random_map, some_random_map, tick_nohz_full_map); #endif Some possible names so we can macroize them to no-ops: exclude_nohz_full_cpus_from(some_random_map); or remove_nohz_full_cpus_from(some_random_map); include_nohz_full_cpus_in(some_random_map); or add_nohz_full_cpus_to(some_random_map); or perhaps with better namespace prefixes, but more confusing to read: tick_nohz_full_exclude_cpus_from(some_random_map); or tick_nohz_full_remove_cpus_from(some_random_map); tick_nohz_full_include_cpus_in(some_random_map); or tick_nohz_full_add_cpus_to(some_random_map); Any of these sound good? Any other ideas? -- 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/