Skip to content
Commit 0f22edf6 authored by Marco Ballesio's avatar Marco Ballesio
Browse files

freezer: synchronous unfreeze

Unfreeze is executed by the same handler queue as compaction/uncompaction.
Heightened compaction activity, like during high memory pressure, will cause
unfreeze to happen after all (un)compactions enqueued before them are completed.
This can potentially cause a stall of several hundred milliseconds for
interactive user journeys.

This change makes unfreeze synchronous with OomAdjuster to minimize
latency to unfreeze, but leaves logging and telemetry collection in the
asynchronous path to reduce impact on the main thread. Total duration of
unfreeze is within a few tens of microsecods as measured on a pixel 4.

Test: verified in logs that unfreeze happens asynchronously. Droidfooded
the chenge on a flame for several days with no adverse effects.

Bug: 143308662

Change-Id: I2eca90a982aed738412fcafe3558ca08bc40534b
parent a95769b7
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