Contiguous Memory Allocator (CMA)

Sadanand Warrier sadanandwarrier at gmail.com
Sat Jan 8 08:37:10 EST 2022


Hello Fabio
   Thanks for the response. I had already accessed that link that you
have pasted. Michal Nazarewicz also has a few other points on using
CMA.
When I tried to use the API after setting cma=128M on the kernel boot
command line and booted the kernel, the api returned without
allocating memory
when the driver was installed.
The dmesg shows that 128M was reserved for CMA but dma_alloc_coherent failed.
It seems that default CentOS and perhaps Ubuntu kernels are not
compiled with CONFIG_DMA_CMA=yes for the dma_alloc_coherent to work.
I'm not sure if this is a valid assumption. I haven't tried
recompiling the kernel yet with that option set.
>From what I have managed to eke out we need CONFIG_CMA=yes and
CONFIG_DMA_CMA=yes too.

Thanks
S


On Sat, 8 Jan 2022 at 07:23, FMDF <fmdefrancesco at gmail.com> wrote:
>
> On Tue, 21 Dec 2021, 15:36 Sadanand Warrier, <sadanandwarrier at gmail.com> wrote:
>>
>> Hello
>>     Is CMA still supported as described in this document
>> https://lwn.net/Articles/396707/ ?
>
>
> Yes, it is.
>
> Read the following instructions on how to use that feature:
>
> "A deep dive into CMA" at
> https://lwn.net/Articles/486301/
>
> Regards,
>
> Fabio M. De Francesco
>



More information about the Kernelnewbies mailing list