Emperor Penguin Linus Torvalds banishes a bug – with a bot
Work on Linux kernel 7.3 is underway, and a bug fix just came in from an unusual source: Linus himself.
Well, kind of… The new bug fix has the title of Don’t hand out the flat CCS storage as usable VRAM, and it comes from emperor penguin Linus Torvalds .
Now that kernel 7.2 is out, the team is hard at work on what will be kernel 7.3, which means lots of bug-bashing.
However, while Torvalds remains in charge of the overall kernel project, as he has said a number of times, including on stage last November, “for the last almost 20 years, I’ve not been a programmer.” This bug is an exception to that – but it’s only a partial exception.
The technical issue itself was not all that interesting.
Due to an oopsie in the kernel driver for Intel Xe graphics, machines would freeze during the boot process, just at the point when the OS switches into graphics mode to show the login screen.
That alone makes it tricky to troubleshoot.
The problem was in how the graphics driver set aside memory used by Intel’s Compute Command Streamer (or CCS for short), which the kernel Intel i915 driver documentation describes as: “An engine that has access to the media and GPGPU pipelines, but not the 3D pipeline.” The driver tries to work out where that is, takes the memory below it, and after some other steps, rounds it up to a multiple of 128 kB and sets that as video memory that’s free to use.
The problem was rounding it up – because that sometimes means that it’s marking as available memory that’s already in use.
It should have rounded down instead.
It’s a one-line fix, but finding the error was the problem.
This is where the story gets interesting, for several reasons.
One of them is that it has a remarkably large comment inserted in covering email, which reads as follows: There are several points of interest here.
One is that the fix is from Linus himself.
5News aggregated this summary from the outlet’s public feed. The full article, with all the context, is on www.theregister.com — the content belongs to The Register.