[6.18] Memory Management & Responsiveness Patches#45
Draft
[6.18] Memory Management & Responsiveness Patches#45
Conversation
Patch: linux6.16-le9uo-1.15 Link: https://github.com/firelzrd/le9uo/tree/main/le9uo_patches
Patch: vm.workingset_protection-On-by-default Link: https://github.com/firelzrd/le9uo/tree/main/le9uo_patches
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.
Memory Management & Responsiveness Patches
This patch set focuses on improving system responsiveness under high memory pressure by implementing "Working Set Protection". These patches are based on the
le9uopatch set, adapted for the modern mgLRU framework.Patches Included
mm: enable vm.workingset_protection by defaultmm: working set protectionDescription
Motivation: This patch set is particularly useful for desktop workloads like gaming and software development, where heavy background tasks (e.g., backups, compilations like Gentoo emerges) can run alongside the primary application. The stock Linux kernel sometimes tries too hard to keep all processes alive in these high-memory-pressure situations. This can lead to long system stalls (thrashing or live-locking) where the entire desktop becomes unresponsive, making it impossible to even switch tasks or kill the offending process.
Function: This patch set introduces "Working Set Protection" (
le9uo), which protects the memory of actively used applications (the "working set") from being swapped out. This is achieved by preserving a certain amount of the page cache even during physical memory exhaustion.As a consequence, the Out-of-Memory (OOM) killer intervenes earlier and more decisively when memory pressure becomes critical. Instead of trying to swap endlessly and causing stalls, the kernel immediately invokes the OOM Killer to terminate a process and recover from the critical situation.
Benefits: The feature significantly mitigates performance and stability issues caused by severe memory pressure in key scenarios: