disable CMA from linux-edge aarch64
on Ampere Altra we got error cma: cma_alloc: reserved: alloc failed, req-size: 256 pages, ret: -12
when booting linux-edge
talking on IRC #kernelnewbies with Greg Kroah-Hartman we got explanation that we don't need to have CMA enabled for aarch64
12:29 .................... mps| on alpine linux and aarch64 with kernel 6.1.1 we got this in dmesg output 'cma: cma_alloc: reserved: alloc failed, req-size: 256 pages, ret: -12'
12:31 .................... mps| machine is ampere altra
12:33 .................... mps| is that bug or something else
12:39 .................... mps| CONFIG_CMA_SIZE_MBYTES=16, is that small?
14:57 ................. gregkh| mps: maybe, depends on the system. 16mb seems very tiny for a server, don't you think?
14:57 ................. gregkh| mps: why did you pick that number?
14:57 ................. gregkh| mps: why do you need any CMA at all?
15:36 .................... mps| gregkh: I enabled CMA because some alpine linux users asked for it
15:37 ................. gregkh| mps: it's a very hardware-specific thing though, so anyone who enables it needs to know ahead of time how much to allocate, good luck!
15:37 .................... mps| gregkh: and I set small size value which was offered by default iirc
15:38 .................... mps| gregkh: our infrastructure team member found that it works with 64MB
15:38 ................. gregkh| mps: given that the ampre altra is a huge server chip, 16Mb feels silly.
15:39 ................. gregkh| mps: what hardware device on that chip needs CMA? And why, it shouldn't need it at all, it's a UEFI system.
15:39 ................. gregkh| mps: right?
15:39 .................... mps| gregkh: yes, but we build distro generic kernel so always have to find best option for all, which usually ends with bad options for all
15:40 ................. gregkh| mps: for ARM64 servers, you should only need one image, and without CMA, that's usually only needed for odd hardware platforms like SoC devices.
15:40 .................... mps| gregkh: I'm not sure about CMA, always thought it is not needed but users asked and I enabled it
15:40 ................. gregkh| mps: push back and ask "why" :)
15:41 .................... mps| gregkh: no, I will not ask 'why' but tell 'because gregkh say so' and remove CMA :)
15:41 ................. gregkh| mps: hah! Sure, that's fine with me.
15:42 .................... mps| gregkh: thank you for explanation and help
15:42 ................. gregkh| mps: hah, I didn't explain much, but sure, glad to help! :)
15:42 .................... mps| gregkh: you 'removed' some of my doubts, that is big help
18:47 ................. teejay| gregkh: there was a gpu driver which didn't function well because of CMA. After a lot of debugging we figured out that the system was not having free continuous memory for dma
transfers after a certain amount of time. Moment we debugged the stack trace we hit a path where there were #ifdef CONFIG_CMA. This prompted us to enable CMA and it worked. We never
root caused it why we were not getting any
18:48 ................. teejay| free contiguous memory after some time. I know this is totally a blind case right now but just trying my chances to see if you can throw more insights in the given case. Thanks.