Memory Folios Being Sought For Linux 5.15

Written by Michael Larabel in Linux Kernel on 13 July 2021 at 07:00 AM EDT. 11 Comments
LINUX KERNEL
Being worked on for quite a while now by longtime kernel developer Matthew Wilcox of Oracle is memory folios to improve Linux's memory management and allow for greater efficiency. Benchmarks with memory folios have shown for example kernel builds can be up to 7% faster. It's looking like there is a desire to see at least some of this folios code land for Linux 5.15.

Memory Folios provide a new struct type for the Linux kernel to better manage memory. The prior patch series goes into more detail over the problems with the status quo and the new "folios" approach.
A struct folio is a new abstraction to replace the venerable struct page. A function which takes a struct folio argument declares that it will operate on the entire (possibly compound) page, not just PAGE_SIZE bytes. In return, the caller guarantees that the pointer it is passing does not point to a tail page.

Making use of this new struct in the Linux kernel means dozens of patches, or more than 200 in total if also counting work to adapt the XFS file-system to use it and other kernel code.

David Howells of Red Hat is now seeking that at least the core folios patches could land for Linux 5.15. Due to work being done by Howells on Linux's network file-system support library and local file-system caching, he's hoping to see memory folios introduced the next kernel cycle. Folios will impact his work but at least for some aspects will make some of his feature work easier but also posing some new challenges.

We'll see if it gets queued ahead of Linux 5.15 and certainly exciting to watch any performance-enhancing changes land in the Linux kernel.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week