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

Commit d6c808fd authored by Michael Wachenschwanz's avatar Michael Wachenschwanz
Browse files

Create PROCESS_CAPABILITY_IMPLICT_CPU_TIME

Replace the FREEZER_CUTOFF_ADJ check with a granted capability. The
advantage of this capability over the check is the capability can easily
be propogated, which should work without additional effort when
FREEZER_CUTOFF_ADJ gets changed.

The goal of this change is closely mirror to prior behavior of the
FREEZER_CUTOFF_ADJ based check on freeze policy evaluation, but there
are a couple scenarios that will see a change in behavior (for the
better).
- using BIND_ABOVE_CLIENT will no longer cause a process to accidentally
  freeze themselves.
- Cached UI process will no be frozen if bound to by a unfrozen process.

Additional changes:
- Change the aconfig flag name to better reflect the nature of the two
  cpu time capabilities.
- Grant attaching processes CPU_TIME to avoid their getting frozen.
- Update CachedAppOptimizer#onBlockingFileLock to consider all
  unfreeze scenarios when evaluating a blocked process.

Flag: com.android.server.am.cpu_time_capability_based_freeze_policy
Fixes: 402822818
Bug: 403034947
Test: atest MockingOomAdjusterTests
Change-Id: Ic22d79cd323e20f19fdd5da9bc5eb3ded02c7a95
parent bf429228
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