One of the improvements in the upcoming Linux (opens in new tab) 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 (opens in new tab) 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 (opens in new tab), more Apple Silicon (opens in new tab) bring-up, RISC-V (opens in new tab) 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 (opens in new tab) 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.
Take the latest kernel for a spin on one of these best Linux laptops (opens in new tab) and subscribe to Linux Format magazine (opens in new tab) for more open source and Linux goodness