fix(zram): back off ineffective idle compression (#2347)

This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-17 16:20:32 -05:00
1 parent d7d0583c5a
commit 7ce8b37824
3 files changed
+95 -9

No files matched your search

+6 -3
View File
@@ -75,9 +75,12 @@ finds different processes. The session request targets processes that loaded
Requests are at least 30 seconds apart and need the same
swap reserve as launcher requests. When the session has read back more than half of what the
previous request compressed, that memory is in use: the request is skipped and the wait doubles,
up to five minutes. A request whose memory stayed compressed resets it to 30 seconds. Below half
the headroom the wait is ignored and only the 30-second spacing applies. The state resets when
the game exits.
up to five minutes. A completed request must also raise `MemAvailable` by at least one
sixteenth of the tier headroom, with a 16 MiB minimum; otherwise the same wait doubles because
the pass did not provide meaningful system headroom. A request whose memory stayed compressed or
whose available memory recovers resets the wait to 30 seconds. Below half the headroom the wait
is ignored and only the 30-second spacing applies, so critical pressure can still trigger a
request. The state resets when the game exits.
Measured on a Retroid Pocket Duo (7.5 GiB, kernel 6.6, 6 GiB lzo-rle zram plus a 4 GiB swap file)
entering the world in World of Warcraft: Forever, one run each: