dmabuf: share the mapping with shared copies of the memory
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 20 May 2014 09:18:56 +0000 (11:18 +0200)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Tue, 20 May 2014 13:42:02 +0000 (09:42 -0400)
commitb60888fd4bcacd42bb4e27fa938272d6e72c5c32
treefbb99a93725a36072d8c6eb4abaad5a176aa2526
parentd8a1dc5ea83ebfa6ea8a8deadc6832d668bf6644
dmabuf: share the mapping with shared copies of the memory

With lots of shared memory instances (e.g. created by a RTP payloader) the
overhead of duplicating the file descriptor and creating extra mappings is
significant. To avoid this, the parent memory maps the whole region and the
shared copies just reuse the same mapping.

https://bugzilla.gnome.org/show_bug.cgi?id=730441
gst-libs/gst/allocators/gstdmabuf.c