Thread (33 messages) 33 messages, 11 authors, 2011-02-02

[PATCHv8 00/12] Contiguous Memory Allocator

From: m.szyprowski@samsung.com (Marek Szyprowski)
Date: 2011-01-13 07:02:03
Also in: linux-media, linux-mm, lkml

Hello,

On Wednesday, January 12, 2011 8:04 PM Nicolas Pitre wrote:
On Wed, 12 Jan 2011, Marek Szyprowski wrote:
quoted
I understand that modifying L1 page tables is definitely not a proper way of
handling this. It simply costs too much. But what if we consider that the DMA
memory can be only allocated from a specific range of the system memory?
Assuming that this range of memory is known during the boot time, it CAN be
mapped with two-level of tables in MMU. First level mapping will stay the
same all the time for all processes, but it would be possible to unmap the
pages required for DMA from the second level mapping what will be visible
from all the processes at once.
How much memory are we talking about?  What is the typical figure?
One typical scenario we would like to support is full-hd decoding. One frame is
about 4MB (1920x1080x2 ~= 4MB). Depending on the codec, it may require up to 15
buffers what gives about 60MB. This simple calculation does not include memory
for the framebuffer, temporary buffers for the hardware codec and buffers for 
the stream.
quoted
Is there any reason why such solution won't work?
It could work indeed.

One similar solution that is already in place is to use highmem for that
reclaimable DMA memory.  It is easy to ensure affected highmem pages are
not mapped in kernel space.  And you can decide at boot time how many
highmem pages you want even if the system has less that 1GB of RAM.
Hmmm, right, this might also help solving the problem.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help