|
|
Subscribe / Log in / New account

Using Rust for kernel development

Using Rust for kernel development

Posted Sep 28, 2021 14:46 UTC (Tue) by k3ninho (subscriber, #50375)
Parent article: Using Rust for kernel development

>Thomas Gleixner ... is worried, though, about "the blank page where the memory model should be". Ojeda ... encouraged Paul McKenney that this is the best time to go to the Rust community and tell them how things could be.

I'm a fan of cross-pollination and have huge respect for Paul McKenney's ability to build consensus on a way forward while also teaching the lessons of the past that went wrong. It might be unfair to say that the Kernel memory model is x86, but there's a heavy overlap on the assumptions Linus Torvalds made 30 years ago. I might put a slots on the bingo card that: other memory models do it better; Rust wants to learn those lessons; mismatch with the LKMM when it comes to the essential bikeshedding.

K3n.


to post comments

Using Rust for kernel development

Posted Sep 28, 2021 16:40 UTC (Tue) by pbonzini (subscriber, #60935) [Link] (1 responses)

> It might be unfair to say that the Kernel memory model is x86, but there's a heavy overlap on the assumptions Linus Torvalds made 30 years ago.

I think that's quite incorrect since:

* any x86-based memory model would have serious problem on weakly-ordered architectures, and also would have serious problems with optimizations that do not respect the TSO (total store ordering) model that x86 uses.

* I might be wrong on this, but the first architecture for which Linux supported SMP was either SPARC or Alpha, almost certainly not x86

Right now, the Rust memory model _is_ the C/C++ model since it just reuses the same backend code.

Using Rust for kernel development

Posted Sep 28, 2021 17:24 UTC (Tue) by PaulMcKenney (✭ supporter ✭, #9624) [Link]

And that reuse of the backend code is the challenge!

At the informal meeting called out in the article, I committed to write a blog series on the specific topics that I am concerned about. As Dan Frye was wont to say, "It should be good clean fun." ;-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds