One of the improvements in the upcoming Linux kernel v5.16 is an improvement to the kernel’s memory management functionality, which will reportedly improve the performance of certain workloads by upto 10%.
Dubbed memory folios, the new feature debuted in Linux kernel 5.16-rc1, the first release candidate (RC) of the next version of the Linux kernel, released yesterday by Linus Torvalds, the maintainer of the mainline Linux kernel.
“The multi-page folios offer some improvement to some workloads….Real workloads (eg building the kernel, running postgres in a steady state, etc) seem to benefit between 0-10%,” explained long-time kernel developer, and the author of memory folios, Matthew Wilcox.
Although Torvalds doesn’t imagine the 5.16 release to be a huge release, it’s set to bring in several interesting additions. In addition to memory folios, the release will bring mainline support for the Raspberry Pi 4 Compute Module, more Apple Silicon bring-up, RISC-V hypervisor support for KVM, various file-system improvements, and lots more.
“There’s a bit of everything in here, and you can look to the appended mergelog for some kind of flavor, but I guess the folio work is worth mentioning, since it’s an unusually core thing that we don’t tend to see most releases,” wrote Torvalds as he put out the RC.
According to Wilcox, memory folios will essentially allow filesystems and the page cache to manage memory in larger chunks than PAGE_SIZE, which will eventually lead to the improved performance.
“This pull request converts just parts of the core MM [memory management] and the page cache. For 5.17, we intend to convert various filesystems (XFS and AFS are ready; other filesystems may make it) and also convert more of the MM and page cache to folios. For 5.18, multi-page folios should be ready,” explains Wilcox.
If all goes as per schedule, the final Linux kernel 5.16 is expected to be released in January 2022.