Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Default atomic_pool_size value & changing it
@ 2016-11-15 21:15 Rafał Miłecki
  2016-11-15 21:37 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Rafał Miłecki @ 2016-11-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

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

In my case I was experimenting with a coherent memory used for DMA
descriptors. They are some small structs addressing SKBs and
controlling them:
struct bgmac_dma_desc {
        __le32 ctl0;
        __le32 ctl1;
        __le32 addr_low;
        __le32 addr_high;
} __packed;
Having 5-6 rings 512 entries each requires 48 KiB. There are devices
with 3 Ethernet bgmac devices and 2 wireless devices, 48 KiB * 5 gets
me dangerously close to the limit. I don't see this problem with
upstream default drivers yet, but it may become an issue at some
point.

Raspberry Pi was dealing a similar problem:
https://github.com/raspberrypi/linux/issues/170

Does it make any sense to increase default atomic_pool_size value?

I see there is init_dma_coherent_pool_size function but it seems to be
dead code (can we drop it?).
I can change that value using coherent_pool param, but is that sane to
put it in bootargs of upstream DTS files?
Any advise on this?

-- 
Rafa?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-16  6:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 21:15 Default atomic_pool_size value & changing it Rafał Miłecki
2016-11-15 21:37 ` Russell King - ARM Linux
2016-11-15 21:43   ` Rafał Miłecki
2016-11-16  6:53     ` Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox