Default atomic_pool_size value & changing it

Rafał Miłecki zajec5 at gmail.com
Tue Nov 15 22:53:24 PST 2016


On 15 November 2016 at 22:43, Rafał Miłecki <zajec5 at gmail.com> wrote:
> On 15 November 2016 at 22:37, Russell King - ARM Linux
> <linux at armlinux.org.uk> wrote:
>> On Tue, Nov 15, 2016 at 10:15:51PM +0100, Rafał Miłecki wrote:
>>> I've hit problem with allocating enough coherent DMA memory. Obviously
>>> there is a limit of this memory as pointed by:
>>> [ 0.283667] DMA: preallocated 256 KiB pool for atomic coherent allocations
>>
>> This is for _atomic_ coherent allocations, not for normal coherent
>> allocations.  Normal coherent allocations come from the CMA memory.
>> Make sure you have CMA enabled, and you have enough of it.
>>
>> Boot with cma=xxxMB with xxx set appropriately.
>
> Oh, that definitely sounds like worth trying
> # CONFIG_CMA is not set
> thanks for pointing it to me!

For my quick testing I silly used:
cpu_addr[i] = dma_zalloc_coherent(dev, size, &dma_addr[i], GFP_ATOMIC);
which obviously shouldn't be done in non-sleep mode and shouldn't need
GFP_ATOMIC.

I got it now, thanks again.

-- 
Rafał



More information about the linux-arm-kernel mailing list