Skip to content

Contiguous Memory Allocator

Tomasz Fujak linux-arm-kernel linux-media linux-mm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v8 Latest0 of 12 patches 0 repliesNew

Patches in v8 No applies recorded yet

None of the 12 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCHv8 00/12] Contiguous Memory Allocator
Quoted 9 lines · David Brown
Quoted 7 lines · Felipe Contreras

A generic solution (that I think I already proposed) would be to reserve a chunk of memory for the CMA that can be removed from the normally mapped kernel memory through memblock at boot time. The size of this memory region would be configurable through kconfig. Then, the CMA would have a "dma" flag or something, and take chunks out of it until there's no more, and then return errors. That would work for ARM.

Quoted 5 lines

That sounds an awful lot like the Android kernel's pmem implementation.

Solving this problem is important for us as well, but, I'm not sure I see a better solution that something like Felipe suggests.

Alas, until the multiple mapping problem is solved, we're stuck. Right now, as brought to us by Russell, dma-able memory must be uncached. Can't see reasonable use of such a memory in system-wide manner yet, at least on A8.
A9 has PIPT caches in the data hierarchy, so some workaround could be not to use such memory for program text. But could it really?

Any ideas?

Quoted 3 lines

The disadvantage, of course, being that the memory isn't available for the system when the user isn't doing the multi-media.

The CMA is intended to do this: multimedia memory doubles as movable zone, but again - according to RMK the problem is real (we just haven't run into it yet though). And it's no fun when the device goes to a crawl due to swapping while a third of the physical memory lies unused.

Quoted 2 lines

David