Memory Folios Being Sought 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.
11 Comments