MGLRU Could Land In Linux 5.19 For Improving Performance - Especially Low RAM Situations
MGLRU is a kernel innovation we've been eager to see merged in 2022 and it looks like that could happen for the next cycle, v5.19, for improving Linux system performance especially in cases of approaching memory pressure.
MGLRU is short for Multi-Gen LRU and is a rework by Google engineers on how the kernel's page reclamation code is handled. They found the current Linux kernel page reclamation handling is too expensive and can make poor eviction choices, but MGLRU has been showing to be a big improvement both for their internal workloads and by external parties testing the many public patch revisions.
See some of the enticing MGLRU benchmark results for workloads benefiting the likes of Apache Cassandra, Hadoop, Memcached, PostgreSQL, Redis, MongoDB, FIO, and many other workloads. Or even for cases of running a web browser with many tabs when often facing system memory pressure and SWAP storms, MGLRU has kept systems in a usable state.
Google's Yu Zhao today sent Linus a pull request for MGLRU. While the Linux 5.18 merge window is going on at the moment, Yu wasn't necessarily for pushing it right away, "This is more of an option than a request for 5.18. I'm sending it to you directly because, in my judgement, it's now as ready as it'll ever be."
In the Linux kernel mailing list thread for that pull request, Linus Torvalds said he isn't opposed to it but ultimately isn't going to pull it for Linux 5.18. The basis being that MGLRU hasn't been fully vetted by way of the linux-next tree. He wants to see this big patch series running in Linux-Next for a while to help uncover any issues especially with all the build automation/testing that goes on for Linux-Next.
So at this stage it looks like Mutli-Gen LRU could enter Linux-Next for a cycle or so and if all goes well it could be merged for Linux 5.19 this summer. There's also more sign-offs that would be appreciated but the main reason for not merging into 5.18 is over the lack of Linux-Next exposure .
Prior MGLRU developer summary.
Here's to hoping MGLRU makes it into Linux 5.19!