XArray Proposed For Merging In The Linux 4.19 Kernel

Written by Michael Larabel in Linux Kernel on 13 August 2018 at 07:32 PM EDT. 3 Comments
LINUX KERNEL
Matthew Wilcox who most recently has been employed by Microsoft is looking to get the new XArray data structure added to the Linux 4.19 kernel.

Earlier this year Wilcox was hoping for XArray in Linux 4.17 but that didn't pan out but he believes it is ready for Linux 4.19. XArray is intended to eventually replace the radix tree data structure in the Linux kernel. XArray's advantages include locking support as part of its design, memory not being pre-loaded, and page cache improvements in using XArray.

Matthew Wilcox wrote as part of the 4.19 pull request:
The XArray provides an improved interface to the radix tree data structure, providing locking as part of the API, specifying GFP flags at allocation time, eliminating preloading, less re-walking the tree, more efficient iterations and not exposing RCU-protected pointers to its users.

This patch set introduces the XArray implementation and converts the pagecache over to use it. The page cache is the most complex and important user of the radix tree, so converting it was most important. I have followup patches to convert the other users of the radix tree over to the XArray, but that'll be another hundred or so patches and I want to get this part in first.
Introducing XArray support and converting some of the kernel code to use it like the page cache amounts to 5,749 lines of new code and 2,741 deletions. So far it's looking like XArray will land for Linux 4.19 - stay tuned.
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