linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* AArch64 memory
@ 2018-05-17 15:58 Tim Harvey
  2018-05-18 11:59 ` Robin Murphy
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Harvey @ 2018-05-17 15:58 UTC (permalink / raw)
  To: linux-arm-kernel

Greetings,

I'm trying to understand some details of the AArch64 memory
configuration in the kernel.

I've looked at Documentation/arm64/memory.txt which describes the
virtual memory layout used in terms of translation levels. This
relates to CONFIG_ARM64_{4K,16K,64K}_PAGES and CONFIG_ARM64_VA_BITS*.

My first question has to do with virtual memory layout: What are the
advantages and disadvantages for a system with a fixed 2GB of DRAM
when using using 4KB pages + 3 levels (CONFIG_ARM64_4K_PAGES=y
CONFIG_ARM64_VA_BITS=39) resulting in 512GB user / 512GB kernel vs
using 64KB pages + 3 levels (CONFIG_ARM64_64K_PAGES=y
CONFIG_ARM64_VA_BITS=48)? The physical memory is far less than what
any of the combinations would offer but I'm not clear if the number of
levels affects any sort of performance or how fragmentation could play
into performance.

My second question has to do with CMA and coherent_pool. I have
understood CMA as being a chunk of physical memory carved out by the
kernel for allocations from dma_alloc_coherent by drivers that need
chunks of contiguous memory for DMA buffers. I believe that before CMA
was introduced we had to do this by defining memory holes. I'm not
understanding the difference between CMA and the coherent pool. I've
noticed that if CONFIG_DMA_CMA=y then the coherent pool allocates from
CMA. Is there some disadvantage of CONFIG_DMA_CMA=y other than if
defined you need to make sure your CMA is larger than coherent_pool?
What drivers/calls use coherent_pool vs cma?

Best Regards,

Tim

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

end of thread, other threads:[~2018-05-18 20:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 15:58 AArch64 memory Tim Harvey
2018-05-18 11:59 ` Robin Murphy
2018-05-18 16:43   ` Tim Harvey
2018-05-18 18:15     ` Robin Murphy
2018-05-18 18:49       ` Tim Harvey
2018-05-18 20:59         ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).