LWN on Rust and Linux
-
A Rust implementation of Android's Binder
The Android system was once famous for extensive, out-of-tree kernel enhancements. Many of those have been eliminated or upstreamed over the years, bringing Android much closer to the mainline kernel. One significant component in the "upstreamed" category is Binder, an interprocess communication mechanism that is used only by Android. There are a number of factors that make Binder a good candidate for rewriting in the Rust language; at the 2023 Linux Plumbers Conference, Carlos Llamas and Alice Ryhl described the motivation behind and implementation of a rewrite of Binder in Rust.
-
Rust for Linux — in space
The Rust for Linux (RFL) project may not have (yet) resulted in user-visible changes to the Linux kernel, but it seems the wider world has taken notice. Hongyu Li has announced that the Rust for Linux code is now part of a satellite just launched out of China. The satellite is running a system called RROS, which follows the old RTLinux pattern of running a realtime kernel alongside Linux. The realtime core is written in Rust, using the RFL groundwork.
-
A Nouveau graphics driver update
Support for NVIDIA graphics processors has traditionally been a sore point for Linux users; NVIDIA has not felt the need to cooperate with the kernel community or make free drivers available, and the reverse-engineered Nouveau driver has often struggled to keep up with product releases. There have, however, been signs of improvement in recent years. At the 2023 Linux Plumbers Conference, graphics subsystem maintainer Dave Airlie provided an update on the state of support for NVIDIA GPUs and what remains to be done.
The kernel community's relationship with NVIDIA "has gone up and down" over the years, Airlie began. Recently, though, the company has rearchitected its products, adding a large RISC-V processor (the GPU system processor, or GSP) and moving much of the functionality once handled by drivers into the GSP firmware. The company allows that firmware to be used by Linux and shipped by distributors. This arrangement brings a number of advantages; for example, it is now possible for the kernel to do reclocking of NVIDIA GPUs, running them at full speed just like the proprietary drivers can. It is, he said, a big improvement over the Nouveau-only firmware that was provided previously.
-
What remains to be done for proxy execution
The kernel's deadline scheduling class offers a solution to a number of realtime (or generally latency-sensitive) problems, but it is also resistant to the usual solutions for the priority-inversion problem. The development community has been pursuing proxy execution as a solution to a few scheduling challenges, including this one; the problem is difficult and progress has been slow. LWN last looked at proxy execution in June; at the 2023 Linux Plumbers Conference, John Stultz gave an overview of proxy execution, the current status of the work, and the remaining problems to solve.
The current work is (at least partially) driven by the needs of the Android system, where it would be useful to run some tasks with realtime priorities. Android has run into a lot of priority-inversion problems while trying, though, and the classic solution for such problems (priority inheritance) doesn't work for deadline or non-realtime tasks in Linux. As a result, Android systems cannot throttle background task activity in any useful way without creating inconsistent behavior for the foreground tasks that the user actually cares about at the moment.