Thread (25 messages) 25 messages, 4 authors, 2012-03-08

[Linaro-mm-sig] [PATCHv23 13/16] drivers: add Contiguous Memory Allocator

From: Barry Song <hidden>
Date: 2012-02-29 09:53:58
Also in: linux-media, linux-mm, lkml

2012/2/23 Marek Szyprowski [off-list ref]:
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 <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Michal Nazarewicz <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Rob Clark <redacted>
Tested-by: Ohad Ben-Cohen <redacted>
Tested-by: Benjamin Gaignard <redacted>
Tested-by: Robert Nelson <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help