Messages in this thread |  | | Subject | Re: [PATCH 5/5] slub: Only IPI CPUs that have per cpu obj to flush | | From | Peter Zijlstra <> | | Date | Mon, 26 Sep 2011 09:33:40 +0200 |
| |
On Sun, 2011-09-25 at 11:54 +0300, Gilad Ben-Yossef wrote: > + if (likely(zalloc_cpumask_var(&cpus, GFP_ATOMIC))) { > + for_each_online_cpu(cpu) { > + c = per_cpu_ptr(s->cpu_slab, cpu); > + if (c && c->page) > + cpumask_set_cpu(cpu, cpus); > + } > + on_each_cpu_mask(cpus, flush_cpu_slab, s, 1); > + free_cpumask_var(cpus);
Right, having to do that for_each_oneline_cpu() loop only to then IPI them can cause a massive cacheline bounce fest.. Ideally you'd want to keep a cpumask per kmem_cache, although I bet the memory overhead of that isn't attractive.
Also, what Pekka says, having that alloc here isn't good either.
|  |