Re: [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-02-06 Thread Hillf Danton
2012/2/5 Michal Nazarewicz : > On Sun, 05 Feb 2012 05:25:40 +0100, Hillf Danton wrote: >> >> Without boot mem reservation, what is the successful rate of CMA to >> serve requests of 1MiB, 2MiB, 4MiB and 8MiB chunks? > > > CMA will work as long as you manage to get some pageblocks marked as > MIGRA

Re: [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-02-05 Thread Michal Nazarewicz
On Sun, 05 Feb 2012 05:25:40 +0100, Hillf Danton wrote: Without boot mem reservation, what is the successful rate of CMA to serve requests of 1MiB, 2MiB, 4MiB and 8MiB chunks? CMA will work as long as you manage to get some pageblocks marked as MIGRATE_CMA and move all non-movable pages away.

Re: [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-02-04 Thread Hillf Danton
On Fri, Feb 3, 2012 at 8:18 PM, 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 syst

[PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-02-03 Thread 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 CMA_MIGRATE_TYPE and gives back to the system. Kernel is allowed to allocate movable pages within CMA's manag

Re: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-30 Thread Ohad Ben-Cohen
Hi Marek, On Mon, Jan 30, 2012 at 9:43 AM, Marek Szyprowski wrote: > Did you managed to fix this issue? Yes -- the recent increase in the vmalloc region triggered a bigger truncation in the system RAM than we had before, and therefore conflicted with the previous hardcoded region we were using.

RE: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-29 Thread Marek Szyprowski
Hello, On Saturday, January 28, 2012 7:57 PM Ohad Ben-Cohen wrote: > On Fri, Jan 27, 2012 at 5:17 PM, Marek Szyprowski > wrote: > > There have been some vmalloc layout changes merged to v3.3-rc1. > > That was dead-on, thanks a lot! Did you managed to fix this issue? > > I did then bump into

Re: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-28 Thread Ohad Ben-Cohen
Hi Marek, On Fri, Jan 27, 2012 at 5:17 PM, Marek Szyprowski wrote: > There have been some vmalloc layout changes merged to v3.3-rc1. That was dead-on, thanks a lot! I did then bump into a different allocation failure which happened because dma_alloc_from_contiguous() computes 'mask' before capp

RE: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Marek Szyprowski
Hello, On Friday, January 27, 2012 3:59 PM Ohad Ben-Cohen wrote: > 2012/1/27 Marek Szyprowski : > > Ohad, could you tell a bit more about your issue? > > Sure, feel free to ask. > > > Does this 'large region' > > is a device private region (declared with dma_declare_contiguous()) > > Yes, it i

Re: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Ohad Ben-Cohen
2012/1/27 Marek Szyprowski : > Ohad, could you tell a bit more about your issue? Sure, feel free to ask. > Does this 'large region' > is a device private region (declared with dma_declare_contiguous()) Yes, it is. See omap_rproc_reserve_cma() in: http://git.kernel.org/?p=linux/kernel/git/ohad/

Re: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Ohad Ben-Cohen
2012/1/27 Marek Szyprowski : > I've tested it with 256MiB on Exynos4 platform. Could you check if the > problem also appears on 3.2-cma-v19 branch (I've uploaded it a few hours > ago) Exactly what I needed, thanks :) Both v18 and v19 seem to work fine with 3.2. > The above code has not been chan

RE: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Marek Szyprowski
Hello, On Friday, January 27, 2012 3:28 PM Clark, Rob wrote: > 2012/1/27 Marek Szyprowski : > > Hi Ohad, > > > > On Friday, January 27, 2012 10:44 AM Ohad Ben-Cohen wrote: > > > >> With v19, I can't seem to allocate big regions anymore (e.g. 101MiB). > >> In particular, this seems to fail: > >> >

Re: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Clark, Rob
2012/1/27 Marek Szyprowski : > Hi Ohad, > > On Friday, January 27, 2012 10:44 AM Ohad Ben-Cohen wrote: > >> With v19, I can't seem to allocate big regions anymore (e.g. 101MiB). >> In particular, this seems to fail: >> >> On Thu, Jan 26, 2012 at 11:00 AM, Marek Szyprowski >> wrote: >> > +static in

RE: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Marek Szyprowski
Hi Ohad, On Friday, January 27, 2012 10:44 AM Ohad Ben-Cohen wrote: > With v19, I can't seem to allocate big regions anymore (e.g. 101MiB). > In particular, this seems to fail: > > On Thu, Jan 26, 2012 at 11:00 AM, Marek Szyprowski > wrote: > > +static int cma_activate_area(unsigned long base_p

Re: [Linaro-mm-sig] [PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-27 Thread Ohad Ben-Cohen
Hi Marek, With v19, I can't seem to allocate big regions anymore (e.g. 101MiB). In particular, this seems to fail: On Thu, Jan 26, 2012 at 11:00 AM, Marek Szyprowski wrote: > +static int cma_activate_area(unsigned long base_pfn, unsigned long count) > +{ > +       unsigned long pfn = base_pfn; >

[PATCH 12/15] drivers: add Contiguous Memory Allocator

2012-01-26 Thread 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 CMA_MIGRATE_TYPE and gives back to the system. Kernel is allowed to allocate movable pages within CMA's manag