Re: [PATCH 2/6] change alloc function in pcpu_alloc_pages

From: Minchan Kim
Date: Thu Apr 22 2010 - 06:15:23 EST


On Wed, Apr 21, 2010 at 7:48 PM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> Hello,
>
> On 04/20/2010 05:05 PM, Mel Gorman wrote:
>> alloc_pages_exact_node() avoids a branch in a hot path that is checking for
>> something the caller already knows. That's the reason it exists.
>
> Yeah sure but Minchan is trying to tidy up the API by converting
> alloc_pages_node() users to use alloc_pages_exact_node(), at which
> point, the distinction becomes pretty useless. ÂWouldn't just making
> alloc_pages_node() do what alloc_pages_exact_node() does now and
> converting all its users be simpler? ÂIIRC, the currently planned
> transformation looks like the following.
>
> Âalloc_pages() Â Â Â Â Â Â Â Â Â-> alloc_pages_any_node()
> Âalloc_pages_node() Â Â Â Â Â Â -> basically gonna be obsoleted by _exact_node
> Âalloc_pages_exact_node() Â Â Â -> gonna be used by most NUMA aware allocs
>
> So, let's just make sure no one calls alloc_pages_node() w/ -1 nid,
> kill alloc_pages_node() and rename alloc_pages_exact_node() to
> alloc_pages_node().

Yes. It was a stupid idea. I hope Mel agree this suggestion.
Thanks for careful review, Tejun.


--
Kind regards,
Minchan Kim
--
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/