RBRD rewrites Linux’s RAM disk in Rust and eats a 19% write slowdown for memory safety
On 17 November 2026, Vitaly Wool posted RBRD to the rust-for-linux list: a RAM-backed block driver in Rust that gives up 19% of write performance to guarantee page integrity. Read it as a controlled experiment on the real price of memory safety in the kernel before you judge the number.
17 November 2026. Vitaly Wool, a developer at Konsulko, posted the first patch series for RBRD — a RAM-backed block driver written in Rust — to the rust-for-linux mailing list. 17 November 2026. The driver gives up 19% of single-threaded write performance, and 22% across eight threads, in exchange for a page-integrity guarantee the C version does not offer. 17 November 2026. The author accepts the trade-off with a one-line argument: a RAM disk is still “far faster than any real device.” Why it matters: RBRD is a controlled experiment on the one question still dividing the kernel — how much memory safety in Rust actually costs on a hot path.
A RAM disk, in Rust
Functionally, RBRD invents nothing. The Linux kernel has shipped brd for years, a C driver that exposes a RAM-backed block device — handy for simulations, quick tests, and benchmarks where storage speed would skew the numbers. RBRD is the Rust rewrite of that same “true” in-memory block device, modelled directly on its predecessor.
The choice of brd as the proving ground is deliberate. A RAM disk is a simple, isolated device, with no real hardware behind it and a workload you can measure to the bit. It is the ideal candidate for isolating a single variable: what happens when you apply Rust’s safety model to a page read/write path.
The answer sits in one design rule. Where brd lets a read and a write copy the same page simultaneously, RBRD guarantees the two operations never happen on a page at the same time. That exclusion is what removes an undefined behaviour the C compiler lets through and that Rust rejects by construction.
The price, measured without spin
The developers publish their numbers unvarnished. On writes, RBRD is 19% slower than brd single-threaded, and 22% slower across eight threads. On reads, the gap narrows to between 2% and 10%. With a single lock for the whole device — rather than one per page — eight-thread reads drop to 20–28% behind brd.
The authors also flag that the gap “has not been profiled yet,” so not all of the slowdown is necessarily due to the lock itself — a measure of the honesty that runs through the whole series. A 19% penalty is a ceiling, not a floor.
The transparency of the number is what makes the patch valuable. The Rust-for-Linux community is used to receiving promises of “free” safety; here the cost is announced, quantified, and defended. The authors’ full argument deserves quoting: “We think this is a small price for page integrity: a RAM disk is still far faster than any real device, and a block device should never return data that was never written.”
That last sentence is the point. A block device returning unwritten data is a silent integrity violation — exactly the kind of bug memory safety is meant to make impossible. The cost is paid in percentage points; the gain is measured in whole classes of bugs eliminated. Those bugs are not theoretical: memory-safety defects — use-after-free, out-of-bounds writes — have been the single largest source of exploitable kernel vulnerabilities for years, which is precisely the argument that pushed Rust into the kernel in the first place.
Why undefined behaviour matters for a block device
It helps to understand what the C compiler permits here. In C, a read and a write racing over the same memory page with no lock is undefined behaviour: the compiler is free to optimise as if the collision did not exist, and the result becomes unpredictable — a read that sees a half-written page, or worse. In a filesystem mounted on the RAM disk, that silent corruption spreads into unreadable data with no error message at all.
Rust rejects that possibility at compile time. The language’s borrow model requires that data is not read and mutated simultaneously without explicit exclusion — exactly what RBRD encodes in its lock. The 19% overhead is therefore not the price of a feature, but of a safety property verified statically, before the code ever runs.
What this patch says about the state of Rust in the kernel
RBRD lands inside a broader sequence. Rust has been in the kernel since 6.1, released in December 2022, and its adoption is accelerating in drivers — the language even stabilised its never type in Rust 1.100 last month. Every new Rust driver is a vote in a four-year-old argument between those who see memory safety as the only answer to kernel vulnerabilities and those who fear the maintenance cost of a second language. The precedents are already concrete: NVIDIA is building its Nova kernel driver in Rust for the future official graphics stack, and the language’s abstractions advance driver by driver. RBRD arrives on prepared ground, not virgin territory.
RBRD finally supplies a measured point of comparison instead of a war of slogans. On a simple, hot path, Rust’s aliasing model costs roughly 20% on writes. That is not nothing — but against a RAM disk, whose throughput crushes any real SSD, the overhead is unobservable in practice.
The real question the patch series puts to maintainers is not “is this number acceptable” but “does this model scale.” If read/write exclusion per page costs 20% on a RAM disk, what would it cost on a real storage path where every nanosecond counts? The patch does not answer — it supplies the instrument to measure.
What brd still does better, in practice
For reference, a C RAM disk comes up in three commands, and it remains the everyday tool for filesystem testing.
modprobe brd rd_nr=1 rd_size=$((1024*1024))
mkfs.ext4 /dev/ram0
mount /dev/ram0 /mnt/ramdisk Nobody runs a RAM disk in production — RAM is too expensive to serve as persistent storage, as Phoronix itself notes. So RBRD is not aiming to replace brd in your scripts. It aims to demonstrate, on a simple and honest case, that Rust’s safety has a measurable price — paid in a currency a RAM disk holds, by definition, in endless reserve.
For the maintainers weighing a merge, the bar is also political: a second RAM driver has to earn its place in drivers/block next to one that has worked for two decades. The performance numbers are the easy part; the harder question is whether a 20% tax on a path nobody cares about speed on is worth the second language.
The verdict
Do not replace brd with RBRD in your test scripts — the C version remains faster, better proven, and nobody hot-fixes a RAM disk. But watch the patch series closely: this is the first public, honest measurement of the memory-safety overhead on a storage path, and how maintainers answer it will say more about Rust-for-Linux’s future than ten driver announcements.
If you are writing a kernel driver and hesitating between C and Rust, read this patch before you decide — it poses the only question that matters, the price of integrity, with numbers instead of slogans. The takeaway sits in the authors’ sentence: a block device should never return data that was never written — and paying 20% to guarantee that, on a RAM disk, is not much of a price at all.