LPC 2022: Rust Linux Drivers Capable Of Achieving Performance Comparable To C Code

Written by Michael Larabel in Programming on 12 September 2022 at 07:17 PM EDT. 52 Comments
Held today during the first day of Linux Plumbers Conference 2022 in Dublin was a Rust mini-conference about the ongoing work on making Rust a suitable systems programming language and integrating support for Rust within the mainline Linux kernel. There were many interesting talks from the status of the Rust integration from the Linux kernel to a Rust-written NVMe driver that can perform as well as the C written driver.

Miguel Ojeda who has led the "Rust for Linux" effort presented with a status update on the Linux kernel work. There is the slide deck but basically goes over how the newest patch series has been slimmed down to ease the upstreaming effort, various progress over the past year, and new Rust abstractions continue to be worked on for broadening the possible usage of Rust code within the kernel. Then there is the matter of when the code will be mainlined, hopefully sooner rather than later, particularly now with the initial slimmed-down approach.

While right now Rust's official LLVM-based compiler is needed, there was also a presentation around the ongoing work of the initial GCC Rust support planned for GCC 13. There is still a long journey on that front before the GCC Rust support will have all features implemented and comparable to the LLVM-based compiler.

Of much interest was a talk by Andreas Hindborg of Western Digital around a Rust-based NVMe driver. While the Linux kernel already has its great C-written NVMe driver, experimenting with a Rust-written NVMe driver is interesting due to the driver being widely-used and important. It's also easy for testing and evaluating the Rust driver performance.

While the Rust NVMe driver is still in early stages, the benchmark results are already very promising as shown by Andreas Hindborg with Western Digital:

The results look mighty fine for a still-experimental driver. See all the details via Hindborg's slides. The express conclusions of the NVMe Rust talk?

Other Rust micro-conference talks can be found via the LPC sessions page. Embedded below is the YouTube livestream recording for all of today's Rust talks:

Related News
About The Author
Author picture

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