MEDIA_IOC_REQUEST_ALLOC performance question

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

 



Hi,

Looking at the documentation[1] it states that the fd returned from
MEDIA_IOC_REQUEST_ALLOC can be close()ed and the kernel will take care
of making sure it is ref counted correctly.

Because MEDIA_REQUEST_IOC_REINIT needs to be called on an fd before it
can be reused, is there a performance penalty to allocating a new fd
(with MEDIA_IOC_REQUEST_ALLOC) for every frame instead of having a
pool of fd's that are reused, and then immediately after queuing the
buffer, close the file descriptor?

I have a proof of concept that works, but I haven't tested it for
performance yet.

It would seem that maybe there is a latency penalty because the
MEDIA_REQUEST_IOC_REINIT is called at the end of a frame while
MEDIA_IOC_REQUEST_ALLOC would be called at the start of a frame.

Thanks.

-Fritz

[1]: https://docs.kernel.org/userspace-api/media/mediactl/request-api.html#recycling-and-destruction



[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