You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
mm/vmscan: Add sysctl knobs for protecting the working set [le9uo-1.5]
The kernel does not provide a way to protect the working set under memory
pressure. A certain amount of anonymous and clean file pages is required by
the userspace for normal operation. First of all, the userspace needs a
cache of shared libraries and executable binaries. If the amount of the
clean file pages falls below a certain level, then thrashing and even
livelock can take place.
The patch provides sysctl knobs for protecting the working set (anonymous
and clean file pages) under memory pressure.
== Multi-Gen LRU compatibility ==
le9uo 1.3 and above comes with a long-waited Multi-Gen LRU (MGLRU, orlru_gen)
compatibility. It comes with the working set protection features like it has
to the traditional LRU. Please be aware that there is an MGLRU-specific
limitation. At the latest Linux kernel (version 6.7.5 at the time this is
written), Multi-gen LRU lacks the ability to comply with the vm.swappiness
sysctl knob like it was initially designed. Almost regardless of what value
is put in vm.swappiness (as long as greater than 0), it seems to evict whatever
it finds first. This behavior is coming from MGLRU's page-scanner
design/implementation, and it causes to start to thrash much earlier and easier
than the traditional LRU. MGLRU does rather temporal approach called min_ttl,
but this design has another problem; it's much more difficult to estimate each
system's optimal effective value than traditional LRU + le9's spacial approach,
and when the value is out of the effective range, it easily results either in
too early invocation of OOM killer, or thrashing.
le9uo does not fix this issue, but greatly mitigates it so that these limitations
due to MGLRU's design/implementation isn't a problem anymore.
[1] https://github.com/firelzrd/le9uo/blob/main/le9uo_patches/stable/0001-linux6.6-le9uo-1.5.patch
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
0 commit comments