LWN: Comments on "Lina: Tales of the M1 GPU" https://lwn.net/Articles/916208/ This is a special feed containing comments posted to the individual LWN article titled "Lina: Tales of the M1 GPU". en-us Thu, 16 Oct 2025 09:25:47 +0000 Thu, 16 Oct 2025 09:25:47 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Lina: Tales of the M1 GPU https://lwn.net/Articles/917134/ https://lwn.net/Articles/917134/ Cyberax <div class="FormattedComment"> Not a problem. PyPy is written in Python.<br> </div> Tue, 06 Dec 2022 19:23:00 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/917073/ https://lwn.net/Articles/917073/ smurf <div class="FormattedComment"> So? the C compiler is written in C.<br> </div> Tue, 06 Dec 2022 09:22:25 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/917048/ https://lwn.net/Articles/917048/ fenncruz <div class="FormattedComment"> Then you just need the bpf interpreter written in bpf to complete the cycle.<br> </div> Tue, 06 Dec 2022 07:43:06 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/917047/ https://lwn.net/Articles/917047/ ssmith32 <div class="FormattedComment"> Yes, but soon, the core of Linux will just be a BPF interpreter, and little else ;)<br> <p> But, more seriously, even if it's just drivers, that's still quite a bit of kernel code.<br> </div> Tue, 06 Dec 2022 07:36:51 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916753/ https://lwn.net/Articles/916753/ scientes <div class="FormattedComment"> <span class="QuotedText">&gt; As a wild guess I'd say 5 years until Rust can be used everywhere in the kernel, 10 until new C code gets deprecated.</span><br> <p> I like putting my predictions out 100 years. Then I have zero liability for them being correct.<br> </div> Sat, 03 Dec 2022 14:42:39 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916612/ https://lwn.net/Articles/916612/ smurf <div class="FormattedComment"> <span class="QuotedText">&gt; It's great to see enthusiastic reports like this one, but it'll also be interesting</span><br> <span class="QuotedText">&gt; to read some neutral and maybe negative feedback.</span><br> <p> Well … given this kind of well-deserved, and (above all) justified-by-the-mind-boggling-results feedback (I would NOT have expected this level of success for M1/M2 graphics before spring 2023 or later, given the complexity of the task!) you can post all the negative feedback you want, it probably won't affect the eventual result much.<br> <p> Given all the conventions and constraints you need to adhere to when writing kernel-style C code (with little to no support from the compiler), learning Rust on top of that appears to be a net time saver already.<br> <p> Support for it will only get better. As a wild guess I'd say 5 years until Rust can be used everywhere in the kernel, 10 until new C code gets deprecated. IMHO we'll start getting patches that replace 100 lines of C with 20 of Rust a lot sooner than anybody had any right to expect a year ago.<br> </div> Fri, 02 Dec 2022 12:43:47 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916416/ https://lwn.net/Articles/916416/ moltonel <div class="FormattedComment"> The "core Linux parts that can't be written in Rust yet" are probably less extensive than you think. For example, a new network QoS, filesystem, or LSM, basically anything new and optional would be fair game. That may not fit your definition of "core", but to many people it does, so it's worth noting that Rust isn't just for drivers.<br> <p> On the other hand, any rewrite of existing C code will need a very strong justification, and will probably remain "just an alternate implementation" for a long time.<br> <p> What will Rust actually be used for in mainline remains a wait-and-see affair. It's great to see enthusiastic reports like this one, but it'll also be interesting to read some neutral and maybe negative feedback.<br> <p> It'll be a long time before there's a push for Rust in actual core irreplaceable Linux code. Plenty of time for rustc's gcc backend to mature and gcc's Rust frontend to become usable.<br> </div> Thu, 01 Dec 2022 14:21:03 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916399/ https://lwn.net/Articles/916399/ docontra <blockquote>You won't be allowed to write core Linux code in Rust so long as the set of architectures considered first class for Linux isn't a subset of the architectures which at least work in practice (lets say at least Tier 3 support) for Rust.</blockquote> <p>This is one of the big motivations for both gcc rust front-end projects 0:) (both for the kernel and for basic user space, specifically librsvg/future core-ish packages written in Rust, and firefox-esr dependencies)</p> <p>PD: AFAIK, the big architecture support bottleneck for Rust is LLVM, and not things intrinsic to the language/implementation</p> Thu, 01 Dec 2022 04:10:32 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916277/ https://lwn.net/Articles/916277/ tialaramex <div class="FormattedComment"> You won't be allowed to write core Linux code in Rust so long as the set of architectures considered first class for Linux isn't a subset of the architectures which at least work in practice (lets say at least Tier 3 support) for Rust. This is because in effect such core code would mean now Linux doesn't run on affected architectures, a major decision. Whereas a new PCIe only SATA device driver in Rust doesn't matter if your Linux architecture doesn't have PCI anyway, you lost nothing.<br> <p> The architectures which make the difference aren't exactly household names which want the latest GPU drivers, WiFi, etc. but for now there is more than just a hobbyist with a decaying machine in their back room running these systems and Linus shows no signs of wanting to consign them all to the dustbin, meanwhile the Rust teams are more future focused and there's not a lot of NetBSD-style "Hey I wonder if I could port Rust to this 35 year old machine" antics. Some, but not a lot.<br> <p> I expect that this will change in one or both ways over the next decade, by which time as a result of Rust drivers more Linux developers will have practical kernel experience with Rust and so their views matter in a way that they do not today. "I think this is ugly and I don't understand it" vs "I think this is beautiful although I never tried to use it in the kernel" are opinions, and for your own project that might be enough, but it's not a compelling reason for the kernel. Whereas "The one Rust driver for my area is an endless shitshow, every release I get a dozen bug reports and two dozen patches and it never improves" vs "Literally all of the popular drivers in my area are now Rust, we got three new people who don't know any C writing drivers, I thought our bug email was broken but it turns out nobody reported any bugs for a month, cool." are _informed_ opinions that could influence such a decision once it's possible for core code.<br> </div> Wed, 30 Nov 2022 10:57:04 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916268/ https://lwn.net/Articles/916268/ pbonzini <div class="FormattedComment"> Yeah, I am skeptical about Linux developers migrating in flock to Rust for core code, but for drivers it's a slam dunk.<br> </div> Wed, 30 Nov 2022 08:56:08 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916259/ https://lwn.net/Articles/916259/ rsidd Yes the whole thing is amazing. And this sort of initiative is the best answer to naysayers like Drew DeVault who actually <a href="https://drewdevault.com/2022/10/03/Does-Rust-belong-in-Linux.html">wrote</a> in early October that Rust is "not likely to infuse Linux with a much-needed boost in its contributor base, because Linux has no such need" (among other negative comments). <p> If other developers too find that Rust is so much easier for driver development, its use could explode very rapidly. Wed, 30 Nov 2022 05:13:38 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916252/ https://lwn.net/Articles/916252/ acarno <div class="FormattedComment"> Every time I read a blog post on the Asahi Linux site, I'm amazed at the sheer talent and passion of the folks on that team. I wish I could muster even a tenth of that in my day-to-day life.<br> </div> Wed, 30 Nov 2022 00:05:21 +0000 Lina: Tales of the M1 GPU https://lwn.net/Articles/916210/ https://lwn.net/Articles/916210/ nix <div class="FormattedComment"> This is amazing! But the most amazing part to me is not the Rust part, but the idea of prototyping the driver in Python using drm-shim, and the result actually *working*.<br> </div> Tue, 29 Nov 2022 18:12:04 +0000