Re: [Linaro-mm-sig] [PATCH 02/10] lib: genalloc: Generic allocator improvements

2011-06-14 Thread Jordan Crouse
On 06/10/2011 06:52 AM, Alan Cox wrote: 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 management. IMHO allocate_resource and fr

Re: [PATCH 02/10] lib: genalloc: Generic allocator improvements

2011-06-10 Thread Michal Nazarewicz
On Fri, 10 Jun 2011 14:52:17 +0200, Alan Cox wrote: 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 management. IMHO all

Re: [PATCH 02/10] lib: genalloc: Generic allocator improvements

2011-06-10 Thread Alan Cox
> 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 > management. > > IMHO allocate_resource and friends a bit too heavy here, b

RE: [PATCH 02/10] lib: genalloc: Generic allocator improvements

2011-06-10 Thread Marek Szyprowski
Hello, 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 tha

Re: [PATCH 02/10] lib: genalloc: Generic allocator improvements

2011-06-10 Thread Alan Cox
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 alloc

[PATCH 02/10] lib: genalloc: Generic allocator improvements

2011-06-10 Thread Marek Szyprowski
From: Michal Nazarewicz This commit adds a gen_pool_alloc_aligned() function to the generic allocator API. It allows specifying alignment for the allocated block. This feature uses the bitmap_find_next_zero_area_off() function. It also fixes possible issue with bitmap's last element being not