Messages in this thread | | | Date | Tue, 10 Jan 2012 14:43:21 +0200 | Subject | Re: [PATCH v6 7/8] mm: only IPI CPUs to drain local pages if they exist | From | Gilad Ben-Yossef <> |
| |
2012/1/9 Michal Nazarewicz <mina86@mina86.com>: > On Mon, 09 Jan 2012 17:35:26 +0100, Christoph Lameter <cl@linux.com> wrote: > >> On Sun, 8 Jan 2012, Gilad Ben-Yossef wrote: >> >>> @@ -67,6 +67,14 @@ DEFINE_PER_CPU(int, numa_node); >>> EXPORT_PER_CPU_SYMBOL(numa_node); >>> #endif >>> >>> +/* >>> + * A global cpumask of CPUs with per-cpu pages that gets >>> + * recomputed on each drain. We use a global cpumask >>> + * here to avoid allocation on direct reclaim code path >>> + * for CONFIG_CPUMASK_OFFSTACK=y >>> + */ >>> +static cpumask_var_t cpus_with_pcps; >> >> >> Move the static definition into drain_all_pages()? > > > This is initialised in setup_per_cpu_pageset() so it needs to be file > scoped.
Yes. The cpumask_var_t abstraction is convenient and all but it does make the allocation very non obvious when it does not happen in proximity to the variable use - it doesn't *look* like a pointer. "syntactic sugar causes cancer of the semicolon" and all that.
Gilad
-- Gilad Ben-Yossef Chief Coffee Drinker gilad@benyossef.com Israel Cell: +972-52-8260388 US Cell: +1-973-8260388 http://benyossef.com
"Unfortunately, cache misses are an equal opportunity pain provider." -- Mike Galbraith, LKML -- 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/
| |