mm: rework MGLRU workingset protection - #19
Draft
raz123 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature summary
Port Yu Zhao's MGLRU workingset-protection rework to this page-based Linux 4.19.325 tree. File-descriptor references now use the reference-bit mask, PG_workingset represents the highest tier, and lazy promotion is preserved through generation movement and refault handling.
Source provenance
mm/mglru: rework workingset protectionBaseline and branch
origin/codex/mglru-bootloop-investigationat75249a53957b5725b695ca0af6b7825d7ef31c57feature/mglru-workingset-protection-pagef4fc226092387263c9101172c70235b8de767cd8Exact files changed
include/linux/mm_inline.hinclude/linux/mmzone.hmm/swap.cmm/vmscan.cmm/workingset.cABI and userspace behavior
No framework, ROM, device-tree, sepolicy, or userspace changes. Existing MGLRU sysfs/debugfs controls and vmstat interfaces remain in place; only reclaim tier classification and workingset protection behavior change.
Regression gate
CI and artifact
flashable-anykernel3(ID8329656734)rp-pocof3_ReSukiSU_b275.zip843c9b4b0d84b3d3c0bc4958daad0f848ca9365ffa7b44d600d27b5379f30d2c4.19.325-cip130-st14-aptusitu-perf-b275-gf4fc22609238 #275Device verification
b275 was validated read-only on alioth: Android 13, boot complete, cold boot, slot
_b, and exact kernel identity4.19.325-cip130-st14-aptusitu-perf-b275-gf4fc22609238 #275matching CI.CONFIG_LRU_GEN=y,CONFIG_LRU_GEN_ENABLED=y, runtimeenabled=0x0003, and live/sys/kernel/debug/lru_gengeneration data were present. Refault/reclaim counters were active;oom_kill=0, and the kernel log scan found no panic, Oops, BUG, watchdog, OOM-killer, or RCU-stall match.Known limitations
This is a page-based 4.19 port, not a direct folio backport. The newer PTE-mapped large-folio follow-up and newer reclaim/writeback series are intentionally excluded. Runtime performance impact is unmeasured.
Next test
Run a controlled b274 versus b275 A/B workload with fixed app set, reboot state, and measurement window. Compare refaults, activation/restoration, reclaim scan/steal, latency, memory pressure, and battery; do not infer performance from lifetime counters alone.