Files
reims-vgpu/scripts
Anees Iqbal 06a13b6cb4 🆕 Offer to turn MGLRU's thrashing guard off on Linux hosts
With /sys/kernel/mm/lru_gen/min_ttl_ms above 0, the kernel kills a process
where it can't keep the pages used in the last that many milliseconds in
memory, even while RAM is free (the kernel's multigen_lru.rst, "Thrashing
prevention"), and a VM's QEMU can be the one killed. CachyOS's kernel sets it
to 100. Measured on hosts here at 100: kswapd invoked the global OOM killer
with most RAM free, killing a compiler with 19 GiB free on um870, and making 19
of a day's 22 OOM kills on ms01. An hour of builds beside a VM on um870 killed
no QEMU.

The installer and reims-ctl doctor now read the file, and above 0 they say
what it does in one line. On a terminal they offer to write 0 with sudo, and
they show the systemd-tmpfiles line that keeps it at 0 after a restart.
Without a terminal they only tell. VMs run either way, so doctor doesn't count
it as a failure.

Tested in mount namespaces on um790, where the file was a root-owned copy
holding 100 or 0: the installer without a terminal, and on one answering y and
n; then doctor the same ways. Each wrote 0 only on a y, said nothing at 0, and
left the host's own file at 100.
2026-11-07 11:12:50 -08:00
..