This article is more than 1 year old

'Bulls%^t! Complete bull$h*t!' Reset the clock on the last time woke Linus Torvalds exploded at a Linux kernel dev

Yes, we too would lose our mind over *checks notes* page caches and storage IO

Linux kernel chieftain Linus Torvalds owes the swear jar a few quid this week, although by his standards this most recent rant of his is relatively restrained.

Over on the kernel development mailing list, in a long and involved thread about the functionality and efficiency of operating system page caches, firebrand-turned-woke Torvalds described Aussie programmer Dave Chinner’s arguments in the debate as "bullshit," "complete bullshit," and "obviously garbage."

To be fair to the open-source overlord, this is a far less personal attack than previous outbursts, such as the time he slammed "some security people" as "just f#cking morons," or that unforgettable straight-to-the-point detonation: "Mauro, SHUT THE F**K UP."

Blow up

In this latest tussle, which has been brewing since mid-month, Chinner noted: "The page cache is still far, far slower than direct IO." The page cache is an area of system RAM reserved for, ideally, holding regularly accessed data normally held on storage devices. Reading and writing from and to the cache in RAM is typically faster that pulling or pushing the information out of or into the underlying hard disk or flash drive, which is why Torvalds blew up at Chinner's assertion.

"Bullshit, Dave ... Caches work, Dave," Torvalds shot back. "Anybody who thinks caches don't work is incompetent. 99% of all filesystem accesses are cached, and they never do any IO at all, and the page cache handles them beautifully.

"When you say that the page cache is slower than direct IO, it's because you don't even see or care about the *fast* case. You only get involved once there is actual IO to be done."

Now, what Torvalds said ain't wrong. However, the the thing is, crucially, Chinner was talking in the context of specific IO requests that just don't cache well, and noted that these inefficiencies could become more obvious as the deployment of PCIe 4.0-connected non-volatile storage memory spreads. Thus, the Aussie hit back:

You've taken one single statement I made from a huge email about complexities in dealing with IO concurrency, the page cache and architectural flaws in the existing code, quoted it out of context, fabricated a completely new context and started ranting about how I know nothing about how caches or the page cache work.

Not very professional but, unfortunately, an entirely predictable and expected response.

Linus, nobody can talk about direct IO without you screaming and tossing all your toys out of the crib. If you can't be civil or you find yourself writing a some condescending "caching 101" explanation to someone who has spent the last 15+ years working with filesystems and caches, then you're far better off not saying anything.

Chinner, who maintains the SGI-created XFS file system, concluded by clarifying in black and white: "For a highly concurrent application that is crunching through bulk data on large files on high throughput storage, the page cache is still far, far slower than direct IO."

In response, Torvalds grumbled about his debate opponent "back-tracking a bit," before adding: "I don't understand why you hate the page cache so much. For the cases you care about, the page cache should be a total non-issue ... maybe some day people won't have SSDs at all, and it's all NVDIMMs, and all filesystem data accesses are DAX, and caching is all done by hardware and the page cache will never exist at all.

"But honestly, that day is not today. It's decades away, and might never happen at all."

The thread continued on, with Chinner agreeing with a colleague yesterday: "Yup, that was the point I was trying to make when Linus started shouting at me about how caches work and how essential they are."

History

Torvalds apologised for being overly aggressive in September, and took a short break from kernel oversight to clam down and get some help to change his behavior.

He said his "flippant attacks in emails" to fellow programmers and kernel contributors "have been both unprofessional and uncalled for. Especially at times when I made it personal ... I know now this was not OK and I am truly sorry."

Some worried at the time that a too-chilled-out Linus would mean weaker and buggier code being let into the kernel because, they assumed, he wouldn't crack down quite as much on developers. There was no danger of that then, and seemingly no danger of that now.

On the one hand, managing a successful open-source mega-project like the Linux kernel, used in billions of computers, gadgets, servers, and other boxes globally, must be as stressful as herding hundreds of psionic cats – though, on the other hand, flying off the handle over a page cache probably won't deescalate that stress. Just saying.

Of course, we'll never quite know everything of that goes on in the hallways, meeting rooms, and office cubicles of big software houses developing similar code, and the swearing and ranting echoing off the walls there, whereas due to the open nature of the Linux kernel, Linus's rows and spats play out in public for everyone to see, and vultures like us to write up about.

This latest storm on a mailing list is available starting here. ®

More about

TIP US OFF

Send us news


Other stories you might like