Correlation CMA size and FORCE_MAX_ZONEORDER

From: Michael Nazzareno Trimarchi
Date: Thu Sep 15 2022 - 17:36:32 EST


Hi all

Working on a small device with 128MB of memory and using imx_v6_v7
defconfig I found that CMA_SIZE_MBYTES, CMA_SIZE_PERCENTAGE
are not respected. The calculation done does not allow the requested
size. I think that this should be somehow documented and described but
I did not
find the documentation. Does it work this way?

With CMA_SIZE of 8MB I need to have FORCE_MAX_ZONEORDER=12 if I have
the default FORCE_MAX_ZONEORDER=14 the min size is 32Mb

Michael