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

Skip to content
Commit 26de80f7 authored by Connor O'Brien's avatar Connor O'Brien Committed by Steven Moreland
Browse files

libtimeinstate: support concurrent_{active,policy}_time



Add support for querying and clearing stats for time each UID spent
running concurrently with tasks on all other CPUs and on CPUs in the
same cluster.
Also add tests for the new functions, including consistency checks
comparing time in state vs concurrent times.
Finally, because the BPF program cannot update multiple map values
atomically, userspace reads occasionally occur in between the updates
to a UID's active and policy times. Add a check for this in our reader
functions and retry once when it is detected. For the (very rare) case
where the same race occurs when retrying, include a comment in our
consistency test to help distinguish these transient failures from a
more serious bug.

Test: libtimeinstate_test passes
Bug: 138317993
Change-Id: I429ed39d3ef82b6643fd042a74d9d403c658a8c1
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
(cherry picked from commit daceef75)
Merged-In: I429ed39d3ef82b6643fd042a74d9d403c658a8c1
parent 1a180406
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment