From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.171]:58293 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755885Ab1GELuS (ORCPT ); Tue, 5 Jul 2011 07:50:18 -0400 From: Arnd Bergmann To: Marek Szyprowski Subject: Re: [PATCH 6/8 RESEND] drivers: add Contiguous Memory Allocator Date: Tue, 5 Jul 2011 13:50:10 +0200 Cc: 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, Michal Nazarewicz , Kyungmin Park , Andrew Morton , KAMEZAWA Hiroyuki , Ankita Garg , Daniel Walker , Mel Gorman , Jesse Barker , Jonathan Corbet , Chunsang Jeong References: <1309851710-3828-7-git-send-email-m.szyprowski@samsung.com> <1309863722-6370-1-git-send-email-m.szyprowski@samsung.com> In-Reply-To: <1309863722-6370-1-git-send-email-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201107051350.11150.arnd@arndb.de> List-ID: Sender: On Tuesday 05 July 2011, Marek Szyprowski wrote: > The Contiguous Memory Allocator is a set of helper functions for DMA > mapping framework that improves allocations of contiguous memory chunks. > > CMA grabs memory on system boot, marks it with CMA_MIGRATE_TYPE and > gives back to the system. Kernel is allowed to allocate movable pages > within CMA's managed memory so that it can be used for example for page > cache when DMA mapping do not use it. On dma_alloc_from_contiguous() > request such pages are migrated out of CMA area to free required > contiguous block and fulfill the request. This allows to allocate large > contiguous chunks of memory at any time assuming that there is enough > free memory available in the system. > > This code is heavily based on earlier works by Michal Nazarewicz. > > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park > CC: Michal Nazarewicz Reviewed-by: Arnd Bergmann , but I noticed two one-character mistakes: > +if CMA > + > +config CMA_DEBUG > + bool "CMA debug messages (DEVELOPEMENT)" s/DEVELOPEMENT/DEVELOPMENT/ > diff --git a/drivers/base/Makefile b/drivers/base/Makefile > index 4c5701c..be6aab4 100644 > --- a/drivers/base/Makefile > +++ b/drivers/base/Makefile > @@ -5,6 +5,7 @@ obj-y := core.o sys.o bus.o dd.o syscore.o \ > cpu.o firmware.o init.o map.o devres.o \ > attribute_container.o transport_class.o > obj-$(CONFIG_DEVTMPFS) += devtmpfs.o > +obj-$(CONFIG_CMA) += dma-contiguous.o > obj-y += power/ > obj-$(CONFIG_HAS_DMA) += dma-mapping.o Please add another tab to indent the line in the same way as the others. Arnd