From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id D12C59000C2 for ; Wed, 6 Jul 2011 10:24:24 -0400 (EDT) Date: Wed, 6 Jul 2011 15:23:45 +0100 From: Russell King - ARM Linux Subject: Re: [PATCH 6/8] drivers: add Contiguous Memory Allocator Message-ID: <20110706142345.GC8286@n2100.arm.linux.org.uk> References: <1309851710-3828-1-git-send-email-m.szyprowski@samsung.com> <20110705113345.GA8286@n2100.arm.linux.org.uk> <006301cc3be4$daab1850$900148f0$%szyprowski@samsung.com> <201107061609.29996.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107061609.29996.arnd@arndb.de> Sender: owner-linux-mm@kvack.org List-ID: To: Arnd Bergmann Cc: Marek Szyprowski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, 'Daniel Walker' , 'Jonathan Corbet' , 'Mel Gorman' , 'Chunsang Jeong' , 'Michal Nazarewicz' , 'Jesse Barker' , 'Kyungmin Park' , 'Ankita Garg' , 'Andrew Morton' , 'KAMEZAWA Hiroyuki' On Wed, Jul 06, 2011 at 04:09:29PM +0200, Arnd Bergmann wrote: > Maybe you can simply adapt the default location of the contiguous memory > are like this: > - make CONFIG_CMA depend on CONFIG_HIGHMEM on ARM, at compile time > - if ZONE_HIGHMEM exist during boot, put the CMA area in there > - otherwise, put the CMA area at the top end of lowmem, and change > the zone sizes so ZONE_HIGHMEM stretches over all of the CMA memory. One of the requirements of the allocator is that the returned memory should be zero'd (because it can be exposed to userspace via ALSA and frame buffers.) Zeroing the memory from all the contexts which dma_alloc_coherent is called from is a trivial matter if its in lowmem, but highmem is harder. Another issue is that when a platform has restricted DMA regions, they typically don't fall into the highmem zone. As the dmabounce code allocates from the DMA coherent allocator to provide it with guaranteed DMA-able memory, that would be rather inconvenient. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org