[lkml]   [2011]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 02/10] lib: genalloc: Generic allocator improvements

On Friday, June 10, 2011 1:25 PM Alan Cox wrote:

> I am curious about one thing
> Why do we need this allocator. Why not use allocate_resource and friends.
> The kernel generic resource handler already handles object alignment and
> subranges. It just seems to be a surplus allocator that could perhaps be
> mostly removed by using the kernel resource allocator we already have ?

genalloc was used mainly for historical reasons (in the earlier version we
were looking for direct replacement for first fit allocator).

I plan to replace it with lib/bitmap.c bitmap_* based allocator (similar like
it it is used by dma_declare_coherent_memory() and friends in
drivers/base/dma-coherent.c). We need something really simple for CMA area

IMHO allocate_resource and friends a bit too heavy here, but good to know
that such allocator also exists.

Best regards
Marek Szyprowski
Samsung Poland R&D Center

 \ /
  Last update: 2011-06-10 14:25    [W:0.093 / U:23.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site