[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DF782F1.9030105@codeaurora.org>
Date: Tue, 14 Jun 2011 09:49:05 -0600
From: Jordan Crouse <jcrouse@...eaurora.org>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: Marek Szyprowski <m.szyprowski@...sung.com>,
'Ankita Garg' <ankita@...ibm.com>,
'Daniel Walker' <dwalker@...eaurora.org>,
'Arnd Bergmann' <arnd@...db.de>,
'Johan MOSSBERG' <johan.xx.mossberg@...ricsson.com>,
'Jesse Barker' <jesse.barker@...aro.org>,
'Mel Gorman' <mel@....ul.ie>, linux-kernel@...r.kernel.org,
'Michal Nazarewicz' <mina86@...a86.com>,
linaro-mm-sig@...ts.linaro.org, linux-mm@...ck.org,
'Kyungmin Park' <kyungmin.park@...sung.com>,
'KAMEZAWA Hiroyuki' <kamezawa.hiroyu@...fujitsu.com>,
'Andrew Morton' <akpm@...ux-foundation.org>,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org
Subject: Re: [Linaro-mm-sig] [PATCH 02/10] lib: genalloc: Generic allocator
improvements
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 friends a bit too heavy here, but good to know
>> that such allocator also exists.
>
> Not sure I'd class allocate_resource as heavyweight but providing it's
> using something that already exists rather than inventing yet another
> allocator.
>
> This wants dealing with before it goes upstream though so the chaneges in
> lib/*c etc never have to reach mainline and then get changed back.
Even if CMA doesn't end up using genalloc, there are existing consumers of
the API and I think the _aligned function has value.
I agree that allocate_resource isn't overly heavy, but comparatively genalloc
is really simple and lightweight for a driver to manage a contiguous address
space without a lot of extra thought. I think both APIs serve slightly
different masters, but if somebody thought about it long enough there could
be some consolidation (same goes for the internal guts of
dma_declare_coherent_memory).
I agree with Michal - if genalloc goes deprecated, then so be it, but as
long as it lives, I think its useful to get these functions upstream.
Jordan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists