Multi Queue Linux Block Device Drivers in Rust


Rust for Linux has brought in Rust as a second programming in the Linux Kernel. The Rust for Linux project is making good progress towards building a general framework for writing Linux kernel device drivers in safe Rust. The Rust NVMe driver is an effort to implement a PCI NVMe driver in safe Rust, for use in the Linux Kernel. The purpose of the driver is to provide a vehicle for development of safe Rust abstractions for the Linux kernel, and to prove feasibility of Rust as an implementation language for high performance device drivers. In this talk we cover the state of the general Linux kernel Rust framework and the progress of a new NVMe driver written in Rust, including recent benchmark results and features. We also cover the new Rust null_blk Linux kernel driver - an effort to implement the Linux null_blk driver in Rust. An analysis of all the commits in the C null_blk driver (currently 256 exluding merge commits) shows that 27% (68) of these commits are bug fixes. Out of these 27%, 41% (28) are fixes for memory safety issues. These are issues that would be avoided in a Rust based implementation.

Related Sessions