5 ms·
> First, there is no reason why we have to choose between Rust in the Linux kernel and a new Rust kernel. First, we may have to choose between those things bec
by stonogo 2y ago
> First, there is no reason why we have to choose between Rust in the Linux kernel and a new Rust kernel.
First, we may have to choose between those things because Rust in the Linux kernel is not gaining traction and major contributors are dropping out rather than seeing it through. It's valid to speculate about alternatives.
Second, software development is not a zero-sum game and such a rewrite can exist in concert with Rust-for-Linux (and even benefit from it). Drew is not handing out orders here anyway.
> Second, this would perpetuate toxic LKML behavior. I'd suggest maybe this bad behavior should be dealt with.
You've used the passive voice here, and the probable reason for that is that there is nobody who is or will ever be responsible for dealing with LKML's shitty "culture." It's a cesspool at every level and will continue to be so until everyone currently in a leadership position is gone.
In addition, the problem here is not technical. Rust is a solution to some technical problems, but technical decisions in a mature group effort are secondary to what Filho referred to as "nontechnical nonsense." That nonsense is the single most important aspect of the project, and too many of the Rust-for-Linux proponents don't seem to understand that. Without developer buy-in, none of your advanced futuristic solutions are even going to make it in the door. The fact that many of the developers whose buy-in you need are assholes is not grounds to reject the work. It simply makes the work less pleasant. Linux moves forward because the people who build it are moving in the same direction. If you want that direction to change, you have to convince a majority of the actors. You're not going to do that by telling them the tools they've used for decades are bad and wrong and the answer is this other shit you happen to be good at.
People keep making this assumption that Rust-for-Linux is hindered by technology considerations, but that was never the case. It is and always has been a sales pitch, and the Rust-for-Linux people have completely fumbled the ball at almost every stage.
There is a great example in Filho's linked video where he's showing get_or_create_inode and the C devs (poorly and abrasively) try to explain that this design means to implement special cases you have to go fucking around in the type system instead of just branching differently in the call site where the other logic is. Filho gets frustrated because he can't seem to understand that using types this way is not intuitive for many people, and the C people get frustrated because Filho's answers don't account for their objections at all.
There's another great example in this very thread where you declare that "the Rust devs showed an better/easier way." They, arguably, did not, if you're not a Rust dev. To someone who isn't accustomed to idiomatic Rust, it seems completely insane to have to go digging around in the type system in order to enable magic elsewhere in the call stack, when you can just tell the computer what to do. Nobody at any point is trying to demonstrate why the Rust approach is superior -- a position I happen to agree with, for the record -- and instead just bemoan these stupid C toddlers who don't take the same things for granted that Rust adults do. It's pointlessly demeaning, combative, and in this case self-defeating, and it's the primary reason I think projects which use Rust ab initio succeed more than these piecemeal approaches.
- mustache_kimono 2y agoWe mostly agree. I come to a slightly different conclusion. That more than a sales pitch someone needs to lead this project. GKH could decide to build something in Rust for instance. Re: whether Drew's proposed solution is a reasonable alternative to Rust for Linux, I don't think the technical/practical reasons for wanting Rust for Linux have gone away. We use Linux. We want memory safety. We will be waiting a long time if we are waiting for a new kernel to appear. > To someone who isn't accustomed to idiomatic Rust, it seems completely insane to have to go digging around in the type system in order to enable magic elsewhere in the call stack, when you can just tell the computer what to do. I think this would be a fairer point if the interface was a well documented C interface, which demonstrated how to use the interface correctly but it wasn't. See the API docs: https://www.kernel.org/doc/html/v6.0/filesystems/api-summary.html#c.iget_locked https://www.kernel.org/doc/html/v6.0/filesystems/api-summary... And the function itself: https://github.com/torvalds/linux/blob/d5d547aa7b51467b15d9caa86b116f8c2507c72a/fs/inode.c#L1360 https://github.com/torvalds/linux/blob/d5d547aa7b51467b15d9c... Ask yourself when and how this can fail. I'm not sure those case are covered here, but they definitely were in the Rust type signature. If these C guys don't like types, fine. But these guys need summon help quick if the above is the best they can do.
- stonogo 2y agoThe level of documentation is fairly demonstrably irrelevant. I agree it's garbage, but on the other hand all fifty or so filesystems in the kernel seem to get by without it, and have done for as long as the API has existed. Rust doesn't even have a specification ... still ... a year after deciding one was necessary ... so fingers point both directions here. But even this is a sideshow, a distraction from the main point: these C people are the ones you need to convince. Bitching at them isn't going to make it happen. Until someone sits down and deploys sufficient empathy to figure out how to appeal to their priorities, good things will continue not to happen for Rust-for-Linux. No amount of technical evidence will do the job.
- mustache_kimono 2y ago> I agree it's garbage, but on the other hand all fifty or so filesystems in the kernel seem to get by without it, and have done for as long as the API has existed. Have they? I mean what we know from Asahi Lina is that other subsystems need help. That DRM is mostly garbage that needs fixing. > Rust doesn't even have a specification ... still ... a year after deciding one was necessary ... so fingers point both directions here. I'm not sure that's a great example. Especially re: C, with UB all over the place. C says "Sure we have a spec! It doesn't cover that much, and compiler writers are eager as hell to break your bounds checks." > Until someone sits down and deploys sufficient empathy to figure out how to appeal to their priorities, good things will continue not to happen for Rust-for-Linux. No amount of technical evidence will do the job. I think somebody needs to lead this project FFS. Either Linus or GKH. Someone needs to either make it happen or dump it. Screwing around with these Rust devs for years is effed up behavior.