[PATCHv8 00/12] Contiguous Memory Allocator

Tomasz Fujak t.fujak at samsung.com
Mon Dec 27 05:56:15 EST 2010


On 2010-12-23 19:04, David Brown wrote:
> Felipe Contreras <felipe.contreras at gmail.com> writes:
>
>> 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.
> 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?
> 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.
> David
>




More information about the linux-arm-kernel mailing list