After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733952 - videopool: allocate page-aligned buffers
videopool: allocate page-aligned buffers
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 733949
Reported: 2014-07-30 04:44 UTC by Gwenole Beauchesne
Modified: 2018-11-03 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Gwenole Beauchesne 2014-07-30 04:44:39 UTC
In order to improve interop with GPU resources, it would help to make sure video buffer allocations are page-aligned. This is in view to using userptr (kernel >= 3.16) and expose that to the GPU for further processing.

There are two ways to implement that:
1. At the video pool level, in the alloc_buffer() implementation.
2. At the system allocator level, through an additional settable param.

Approach (1) is trivial, while approach (2) is more generic and has the potential to be used in other scenarios beyond video buffers.

What is the preferred approach? Thanks.
Comment 1 Nicolas Dufresne (ndufresne) 2014-07-30 13:27:06 UTC
Memory alignment requirement shall be negotiated and this is already supported. The element that will receive the buffer simply propose an allocator and params that set the alignment, upstream will use it if possible. That element will need to check if alignment was respected in order to decide if a copy is needed or not.

USERPTR in most context isn't as simple as having page-aligned buffers though. As of today, most GPU runs without iommus, hence requires contiguous memory (added to some alignment requirement) and some even go further with only using memory from a specific reserved bank.

I think this bug is invalid, correct me if I'm wrong.
Comment 2 Sebastian Dröge (slomo) 2014-07-30 13:35:49 UTC
It might make sense to use page alignment as default... or maybe not :)
Comment 3 Gwenole Beauchesne 2014-07-30 13:39:52 UTC
Well, the idea was to make sure to use mmap() and additional gst flags, if necessary. But, yes, let's try a HW specific way before trying to be generic.
Comment 4 Nicolas Dufresne (ndufresne) 2014-12-15 02:29:23 UTC
So any progress in this reflection ? Also, how to we ensure something is page align ? How to we handle that outside Linux ?
Comment 5 GStreamer system administrator 2018-11-03 11:30:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: