lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2015-04-09 20:21    [W:0.081 / U:3.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site