[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150409174218.GT21418@twins.programming.kicks-ass.net>
Date: Thu, 9 Apr 2015 19:42:18 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Chris Metcalf <cmetcalf@...hip.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/2] nohz: add tick_nohz_full_cpumask_or() and
_andnot() APIs
On Thu, Apr 09, 2015 at 01:24:22PM -0400, Chris Metcalf wrote:
> 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?
Yes, I think these are all clearer than previous attempts.
I'm not entirely sure which to pick though; I have a vague preference
for add/remove over include/exclude and the top set reads better then
the lower set but the lower set is more consistent in naming :/
But the important point is that these names all indicate you're going to
change the mask passed as argument.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists