From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 6 Jul 2011 16:59:45 +0200 Subject: [Linaro-mm-sig] [PATCH 6/8] drivers: add Contiguous Memory Allocator In-Reply-To: References: <1309851710-3828-1-git-send-email-m.szyprowski@samsung.com> <20110706142345.GC8286@n2100.arm.linux.org.uk> Message-ID: <201107061659.45253.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wednesday 06 July 2011, Nicolas Pitre wrote: > On Wed, 6 Jul 2011, Russell King - ARM Linux wrote: > > > 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. > > Do we encounter this in practice i.e. do those platforms requiring large > contiguous allocations motivating this work have such DMA restrictions? You can probably find one or two of those, but we don't have to optimize for that case. I would at least expect the maximum size of the allocation to be smaller than the DMA limit for these, and consequently mandate that they define a sufficiently large CONSISTENT_DMA_SIZE for the crazy devices, or possibly add a hack to unmap some low memory and call dma_declare_coherent_memory() for the device. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753777Ab1GFPAV (ORCPT ); Wed, 6 Jul 2011 11:00:21 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:52466 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232Ab1GFPAU (ORCPT ); Wed, 6 Jul 2011 11:00:20 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: Re: [Linaro-mm-sig] [PATCH 6/8] drivers: add Contiguous Memory Allocator Date: Wed, 6 Jul 2011 16:59:45 +0200 User-Agent: KMail/1.12.2 (Linux/2.6.37; KDE/4.3.2; x86_64; ; ) Cc: Nicolas Pitre , "Russell King - ARM Linux" , "'Daniel Walker'" , "'Jonathan Corbet'" , "'Mel Gorman'" , "'Chunsang Jeong'" , linux-kernel@vger.kernel.org, "'Michal Nazarewicz'" , linaro-mm-sig@lists.linaro.org, "'Jesse Barker'" , "'Kyungmin Park'" , "'Ankita Garg'" , "'Andrew Morton'" , linux-mm@kvack.org, "'KAMEZAWA Hiroyuki'" , linux-media@vger.kernel.org References: <1309851710-3828-1-git-send-email-m.szyprowski@samsung.com> <20110706142345.GC8286@n2100.arm.linux.org.uk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107061659.45253.arnd@arndb.de> X-Provags-ID: V02:K0:5UV86gVAQccUTDm1e62xpLJkPnzp/keGWDpFsd63cuO uWw4ddxCVu5a7cpWNp6w4u4VzwitWQz4GqvTePVBjO/s/ZZZZ5 7TbYs5qlH6kx1PGuXP0bzOQllMrqMDLSYXss40ntnVwYD67hSw Ms9Bi7TcMDVyg1aXGxsmA2IzehW7/9U5Lpr0+pYojz5CCBmndQ 6v4VG+YtRMM4iO24Erj8Q== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 06 July 2011, Nicolas Pitre wrote: > On Wed, 6 Jul 2011, Russell King - ARM Linux wrote: > > > 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. > > Do we encounter this in practice i.e. do those platforms requiring large > contiguous allocations motivating this work have such DMA restrictions? You can probably find one or two of those, but we don't have to optimize for that case. I would at least expect the maximum size of the allocation to be smaller than the DMA limit for these, and consequently mandate that they define a sufficiently large CONSISTENT_DMA_SIZE for the crazy devices, or possibly add a hack to unmap some low memory and call dma_declare_coherent_memory() for the device. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by kanga.kvack.org (Postfix) with ESMTP id 0485B9000C2 for ; Wed, 6 Jul 2011 11:00:24 -0400 (EDT) From: Arnd Bergmann Subject: Re: [Linaro-mm-sig] [PATCH 6/8] drivers: add Contiguous Memory Allocator Date: Wed, 6 Jul 2011 16:59:45 +0200 References: <1309851710-3828-1-git-send-email-m.szyprowski@samsung.com> <20110706142345.GC8286@n2100.arm.linux.org.uk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107061659.45253.arnd@arndb.de> Sender: owner-linux-mm@kvack.org List-ID: To: linux-arm-kernel@lists.infradead.org Cc: Nicolas Pitre , Russell King - ARM Linux , 'Daniel Walker' , 'Jonathan Corbet' , 'Mel Gorman' , 'Chunsang Jeong' , linux-kernel@vger.kernel.org, 'Michal Nazarewicz' , linaro-mm-sig@lists.linaro.org, 'Jesse Barker' , 'Kyungmin Park' , 'Ankita Garg' , 'Andrew Morton' , linux-mm@kvack.org, 'KAMEZAWA Hiroyuki' , linux-media@vger.kernel.org On Wednesday 06 July 2011, Nicolas Pitre wrote: > On Wed, 6 Jul 2011, Russell King - ARM Linux wrote: > > > 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. > > Do we encounter this in practice i.e. do those platforms requiring large > contiguous allocations motivating this work have such DMA restrictions? You can probably find one or two of those, but we don't have to optimize for that case. I would at least expect the maximum size of the allocation to be smaller than the DMA limit for these, and consequently mandate that they define a sufficiently large CONSISTENT_DMA_SIZE for the crazy devices, or possibly add a hack to unmap some low memory and call dma_declare_coherent_memory() for the device. Arnd -- 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