Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 118d0e9f authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Eino-Ville Talvala (Eddy)
Browse files

Camera service: Restructure buffer returns to avoid locks

Currently, the in-flight queue mutex is held while filled buffers are
returned to buffer queues.  Since queuing buffers into a BQ issues
binder calls into the client process, it can take a long time for
these calls to complete on heavily loaded devices.

Instead, collect buffers to be returned and then return them once the
in-flight mutex is released.

All buffer queuing is moved to the new method that consumes the list
of buffers to return, but the placement of the call to the new method
is gated by a flag, keeping the flow and order of buffer return as
close to before when the flag is off.

Performance tracing shows that the duration histogram of getExpectedInflightDuration is much more reasonable now.

Test: Manual testing of various GCA modes, atest CtsCameraTestCases,
    Perfetto comparisons of flag on/off while running GCA in 1080p60
    video recording.
Bug: 315526878
Change-Id: I433b3ce77a07bdf3f3685fe75e1fbd443a94fb4f
parent 3634b6e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment