Turn off CMA in kernel

@guruevi what im seeing (if im reading the output of cat /proc/meminof right!) is that CMA is holding on to its memory allocation and not giving it up - im trying to allocate as many hugepages as i can for my application and cant get much above the 1250 size even with a reboot.

So having done a load more reading and following the tips here - is all i need to do change the dts file and recompile that to remove hardware / drivers from the kernel at boot time rather than recompile the kernel each time? That would save me a lot of time! Sorry if thats a noob question but im a noob when it comes to messing with kernels!

thanks!

You should be able to reclaim that memory by only modifying device tree but I cannot promise you that it won’t crash - if it does, you would need to deselect the drivers in kernel options and recompile the kernel.

By the way, what OS do you need to use? If Linux, perhaps you can try using an OS with mainline kernel which for starters is free of codec_mm CMA reservations? [VIM] Ubuntu Mate with Linux-4.14.11 and U-boot-v2018.01-rc3 ROM alpha-V180106 [SD/USB INSTALLATION]

4 Likes

Ok great - will give that a go!

Yes am using Linux - so will also give that a go!

Thank you!