RE: [PATCH 1/3 v2] media: Add a cached version of the contiguous video buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Richard Röjfors <richard.rojfors@xxxxxxxxxxxxxx> wrote:
>On 08/04/2010 09:55 AM, Pawel Osciak wrote:
>> Hi Richard,
>>
>>> Richard Röjfors wrote:
>>> This patch adds another init functions in the videobuf-dma-contig
>>> which is named _cached in the end. It creates a buffer factory
>>> which allocates buffers using kmalloc and the buffers are cached.
>>>
>>
>> Before I review this in more detail, could you elaborate more on
>> this? How large are your buffers, can kmalloc really allocate them
>> for you? I am not convinced how this is supposed to work reliably,
>> especially in a long-running systems.
>
>The buffers are normally 829440 bytes and yes kmalloc can allocate them.
>Normally userspace apps seem to request two buffers of this size.
>
>How do you propose to allocate the buffers? They need to be contiguous
>and using uncached memory gave really bad performance.

829440 bytes is a quite a lot and one can't reliably depend on kmalloc
to be able to allocate such big chunks of contiguous memory. Were you
testing this on a freshly rebooted system?

What you are asking for is actually a memory management holy grail, there
is no ideal solution for contiguous memory allocation. There are and have
been attempts at creating such an allocator, but there is no such thing
in the kernel as of yet. One very recent proposal for a contiguous memory
allocator can be found on this list, look for  "The Contiguous Memory
Allocator" topic from Jul, 26th.

One solution to have cached buffers is to use bootmem allocation and
map those areas as cached manually.

Best regards
--
Pawel Osciak
Linux Platform Group
Samsung Poland R&D Center





--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux