malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT

2016-05-17 Thread lunar12 lunartwix
A 4MB dma_alloc_coherent in kernel after malloc(2*1024) 40 times in CMA region by user space will cause an error on our ARM 3.18 kernel platform with a 32MB CMA. It seems that the malloc in CMA region will be aligned to CMA_ALIGNMENT everytime even if the requested malloc size is very small so th

Re: malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT

2016-05-18 Thread lunar12 lunartwix
2016-05-18 16:48 GMT+08:00 Michal Hocko : > [CC linux-mm and some usual suspects] > > On Tue 17-05-16 23:37:55, lunar12 lunartwix wrote: >> A 4MB dma_alloc_coherent in kernel after malloc(2*1024) 40 times in >> CMA region by user space will cause an error on our ARM 3.18 kern