Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965667Ab2B2Jx6 (ORCPT ); Wed, 29 Feb 2012 04:53:58 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:60344 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965223Ab2B2Jx4 (ORCPT ); Wed, 29 Feb 2012 04:53:56 -0500 MIME-Version: 1.0 In-Reply-To: <1329929337-16648-14-git-send-email-m.szyprowski@samsung.com> References: <1329929337-16648-1-git-send-email-m.szyprowski@samsung.com> <1329929337-16648-14-git-send-email-m.szyprowski@samsung.com> From: Barry Song <21cnbao@gmail.com> Date: Wed, 29 Feb 2012 17:53:35 +0800 Message-ID: Subject: Re: [Linaro-mm-sig] [PATCHv23 13/16] drivers: add Contiguous Memory Allocator To: Marek Szyprowski 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, Ohad Ben-Cohen , Daniel Walker , Russell King , Arnd Bergmann , Jonathan Corbet , Mel Gorman , Michal Nazarewicz , Dave Hansen , Jesse Barker , Kyungmin Park , Andrew Morton , Rob Clark , KAMEZAWA Hiroyuki , DL-SHA-WorkGroupLinux Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1630 Lines: 34 2012/2/23 Marek Szyprowski : > 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 MIGRATE_CMA migrate type > and gives back to the system. Kernel is allowed to allocate only 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 > Signed-off-by: Michal Nazarewicz > Acked-by: Arnd Bergmann > Tested-by: Rob Clark > Tested-by: Ohad Ben-Cohen > Tested-by: Benjamin Gaignard > Tested-by: Robert Nelson if there is a /proc/cmainfo like /proc/slabinfo, it might be helpful to people as we can see the usage of CMA clearly. Thanks barry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/