[linux-3.10.17] Could not allocate memory from free CMA areas

Joonsoo Kim iamjoonsoo.kim at lge.com
Mon Aug 4 00:11:00 PDT 2014


> Dear Joonsoo,
> 
> I tried your changes which are present at the below link. 
> https://github.com/JoonsooKim/linux/tree/cma-fix-up-v3.0-next-20140625
> But unfortunately for me it did not help much. 
> After running various apps that uses ION nonmovable memory, it fails to allocate memory after some time. When I see the pagetypeinfo shows lots of CMA pages available and non-movable were very less and thus nonmovable allocation were failing.

Okay. CMA pages cannot be used for nonmovable memory, so it can fail in above case.

> However I noticed the failure was little delayed.

It is good sign. I guess that there is movable/CMA ratio problem.
My patchset uses free CMA pages in certain ratio to free movable page consumption.
If your system doesn't use movable page sufficiently, free CMA pages cannot
be used fully. Could you test with following workaround?

+       if (normal > cma) {
+               zone->max_try_normal = pageblock_nr_pages;
+               zone->max_try_cma = pageblock_nr_pages;
+       } else {
+               zone->max_try_normal = pageblock_nr_pages;
+               zone->max_try_cma = pageblock_nr_pages;
+       }

Thanks.




More information about the linux-arm-kernel mailing list