Re: [PATCHSET x86/core/percpu] improve the first percpu chunk allocation

From: Tejun Heo
Date: Tue Feb 24 2009 - 21:24:15 EST


Hello, Ingo.

Patches posted to fix the build failure and warning. Patches are also
available in the usual git tree.

git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-percpu

Ingo Molnar wrote:
> and one tip:master merge impact due to API change:
>
> kernel/trace/trace_functions_graph.c: In function âgraph_trace_closeâ:
> kernel/trace/trace_functions_graph.c:836: error: implicit declaration of function âpercpu_freeâ
>
> that's free_percpu() now, right?
>
> Btw., why was this rename done? We generally standardize on
> hierarchical names, going from the more general to the more
> specific names, left to right. So we have
> <subsystem>_<functionality>_<subtype> sort of names generally.

It's a strange story and not really a rename.

We had __percpu_alloc_mask(), percpu_alloc(), __alloc_percpu() and
alloc_percpu() and of course matching frees. The percpu_*() stuff was
introduced so that allocations can take online cpus into
consideration. So, percpu_alloc() uses cpu_online_map as the default
allocation mask while alloc_percpu() uses cpu_possible_map. The
allocation mask thing never really took off and there virtually was no
user and got killed.

If the only merge impact was percpu_free() and it's not missing
percpu_alloc(), it could be that allocation path used alloc_percpu()
but free path used percpu_free().

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/