|
|
Log in / Subscribe / Register

More Rust concepts for the kernel

More Rust concepts for the kernel

Posted Sep 23, 2021 13:34 UTC (Thu) by cpitrat (subscriber, #116459)
Parent article: More Rust concepts for the kernel

> how many developers the community is willing to lose in this transition; the actual number will almost certainly not be zero

How many developers the community may gain in this transition? The actual number will almost certainly not be zero


to post comments

More Rust concepts for the kernel

Posted Sep 23, 2021 19:48 UTC (Thu) by tialaramex (subscriber, #21167) [Link] (1 responses)

Certainly it's easy to imagine that if writing safe Rust can produce a working kernel driver for relatively simple hardware that's a member of an existing class (e.g yet another serial driver, or a DVB decoder device), there are going to be some people who are pretty mediocre programmers and whose C programming in particular isn't up to this job, but can write an acceptable Rust driver.

In my opinion the best targets are cases where multiple distinct hardware implementations exist without any good reason. Think entry-level PCI network cards in the late 1990s. There's no reason for so many different vendors to make a 100Mbps PCI Ethernet card that has essentially the same features as the competitors but requires its own driver, but that's what happened, and you can imagine that there's nothing interesting (potentially requiring unsafe and deep kernel knowledge or new subsystem code) in the NE2k driver compared to the 3Com one so that the work to make the 19th and 20th of these drivers is not actually the application of arcane wisdom kernel programmers might pride themselves in, but mostly rote work copying from manufacturer data sheets and a little bit of "suck it and see" when the data sheet is needlessly ambiguous. Rust is going to make that practical for patient non-experts whose sole advantage over the existing Linux maintainers is that they own the hardware they're writing a driver for so they can iterate over the "suck it and see" aspects very rapidly.

More Rust concepts for the kernel

Posted Sep 23, 2021 20:34 UTC (Thu) by mpr22 (subscriber, #60784) [Link]

> mostly rote work copying from manufacturer data sheets and a little bit of "suck it and see" when the data sheet is needlessly ambiguous.

Though I'm not sure the data sheet for the NatSemi DP83820 mentions the thing where the transmitter interrupt is unreliable.

More Rust concepts for the kernel

Posted Sep 29, 2021 18:13 UTC (Wed) by anton (subscriber, #25547) [Link] (6 responses)

How many developers the community may gain in this transition? The actual number will almost certainly not be zero
I would not bet on that. From a different field: There are those who lobby for bike paths, because car drivers claim they will switch to bicycles if only the bike paths were there. A few decades later, there are lots of bike paths, but there are still many car drivers and few bike riders (e.g. in Stevenage with bike paths that are the wet dream of bike path fans, the modal split of bikes dropped IIRC from 16% in 1964 to 3% in 2015, with a 68% car modal split (high for a European city)). And if you ask the bike riders, they have not switched from cars; even the fans of bike paths could not name a single person who switched from car to bike because of bike paths when I asked them; by contrast, a collegue of mine stopped bike riding because of bike paths (bike path fans started with insults when I mentioned that).

Back to topic: What happened to OS projects in Rust? If Rust makes an OS project attractive to many highly competent developers, one of these projects should be on the way to overtake Linux, no? Admittedly there is also the draw of contributing to the most widely-used kernel, but still, the BSDs survive despite not having the most widely-used kernel and not being written in Rust.

More Rust concepts for the kernel

Posted Sep 29, 2021 21:24 UTC (Wed) by mpr22 (subscriber, #60784) [Link]

> What happened to OS projects in Rust?

New OS projects usually burble along in obscurity no matter how brilliant the people working on them are, and getting a new OS to the point where people whose primary goal isn't "develop the OS" can usefully use it is a remarkably labour-intensive task, especially if you need all-new device drivers because your design goals preclude the use of existing C or C++ driver code.

> the BSDs survive despite not having the most widely-used kernel and not being written in Rust.

Within their respective niches, the BSDs have well-established user bases. The inertia of users is a powerful thing.

More Rust concepts for the kernel

Posted Sep 30, 2021 9:32 UTC (Thu) by peter-b (guest, #66996) [Link] (4 responses)

> in Stevenage with bike paths that are the wet dream of bike path fans

This is some extremely subtle trolling, right?

More Rust concepts for the kernel

Posted Sep 30, 2021 13:08 UTC (Thu) by anton (subscriber, #25547) [Link] (3 responses)

It was not intended as trolling. My statement is based on Carlton Reid's articles (longer from 2013, shorter from 2017, the pictures shown there and what bike path fans usually argue for: Stevenage has a network of bike paths that is separate but equal from the car infrastructure, on a separate level to avoid the problems that many other bike path networks have with crossings between bit path traffic and other traffic. This network was planned by a bike path fan who had the advantage of a relatively clean slate. If the result does not produce the predicted switch from car to bike, but instead a switch from bike to car, this looks like a good falsification of the theory that people will switch from car to bike if you build them bike paths. BTW, I have now found the modal split numbers: 13% bike in 1964, 2.7% bike in 2013, 68.8% car in 2011.

If you have a different perspective, I would be interested in reading about that.

More Rust concepts for the kernel

Posted Oct 11, 2021 10:24 UTC (Mon) by Klavs (guest, #10563) [Link]

https://supercykelstier.dk/about/ <- in Denmark - they invest heavily in "cycle superpaths" - and they are great - it makes it faster to reach anywhere in town by bike, than by car (almost - at a few off-peak hours - it can be faster by car - but parking costs are NOT low - and parking my bike is free so :)

quote from article "A socio-economic analysis of the cycle superhighways in the Capital Region of Denmark from 2018 shows that the investment in cycle infrastructure and cycle superhighways has many economic benefits. By investing in the total network of 45 routes (in 2018), the cycle superhighways are estimated to give a socio-economic surplus of 765 million euro – due in part to improved health, fewer days of sick leave and less time wasted in traffic jams."

I don't know how they calculated that and I haven't gone looking for a 2021 cycle traffic count.. I know they do count bikes.. and there's a LOT in Copenhagen that bike.. :)

More Rust concepts for the kernel

Posted Oct 11, 2021 10:31 UTC (Mon) by Klavs (guest, #10563) [Link] (1 responses)

So it does indeed seem that the article you link to is correct.. IF its just as quick to drive and free to park - people take the car.
Which is WHY it its NOT free to park in copenhagen (as the air polution from cars is a huge problem - it really shouldn't be either IMHO) and the traffic jams are extensive in peak hours too.. so it actually typicly IS faster to bike anything <15km than doing it by car.

Those 2 factors are clearly driving biking in copenhagen - and the fact that the cycle bike paths are soo good as they are - increases the cycle trafic even more.. But it starts with bikers getting a benefit from biking (typicly cost per trip or time) for most.

Enough of bikepaths here though - the article does not seem to really relate as much, except for the fact that you need a similar incentive, to get developers to want to learn Rust :)

I do think, that if it ends up being "fairly easy" to write safe drivers - in Rust - so the benefits starts showing clearly in CVE statistics - that will probably start helping.. So the more stats the better :)

More Rust concepts for the kernel

Posted Oct 11, 2021 17:31 UTC (Mon) by anton (subscriber, #25547) [Link]

Concerning the transition to Rust in the kernel, it may win some developers and it may lose some developers; the Stevenage experience shows that the outcome can be negative (this time not because of a more attractive alternative, but because working in two languages may reduce the attractiveness of kernel development).

Concerning Copenhagen, according to TEMS Copenhagen had 33% car modal split in 2014 (most recent for Copenhagen), so cars are still quite attractive (by comparison, my home town Vienna had 28% in 2014, and Vienna has very car-centric politics). Concerning the study, I would not be surprised if a lot of the computations are based on wishful thinking (which is very frequent in anything involving bike paths).

Concerning traffic jams, bike path fans recommended this video to show how great Copenhagen is for cyclists. Looking at the traffic coming from the bridge, I see that Copenhagen is great for cars: A wide, bike-free roadway that allows car drivers who want to drive straight ahead to go at full speed when they arrive at the crossing at green and wait at most one red phase otherwise. By contrast, bicyclists have to bunch up on a narrow bike path and often have to wait a full cycle or more (it's not clear how far onto the bridge the bike traffic jam extends at times). Of course, there must be a reason why there are so few cars that cross that bridge, but it's obviously not the bike paths.


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