X
Business

Old Linus Torvalds is back: Linux page caching sparks 'bulls**t' outburst

The real Linus Torvalds stands up.
Written by Liam Tung, Contributing Writer

Linux frontman Linus Torvalds thinks he's "more self-aware" these days and is "trying to be less forceful" after his brief absence from directing Linux kernel developers because of his abusive language on the Linux kernel mailing list. 

But true to his word, he's still not necessarily diplomatic in his communications with maintainers. 

SEE: 20 quick tips to make Linux networking easier (free PDF)    

Torvalds' post-hiatus outburst was directed at Dave Chinner, an Australian programmer who maintains the Silicon Graphics (SGI)-created XFS file system supported by many Linux distros.     

"Bullshit, Dave," Torvalds told Chinner on a mailing list.

The comment from Chinner that triggered Torvalds' rebuke was that "the page cache is still far, far slower than direct IO" – a problem Chinner thinks will become more apparent with the arrival of the newish storage-motherboard interface specification known as Peripheral Express Interconnect Express (PCIe) version 4.0. 

Chinner believes page cache might be necessary to support disk-based storage, but that it has a performance cost.    

"That said, the page cache is still far, far slower than direct IO, and the gap is just getting wider and wider as nvme SSDs get faster and faster. PCIe 4 SSDs are just going to make this even more obvious – it's getting to the point where the only reason for having a page cache is to support mmap() and cheap systems with spinning rust storage," wrote Chinner

But the Finnish-born Linux creator essentially told the Australian not to come the raw prawn

"You've made that claim before, and it's been complete bullshit before too, and I've called you out on it then too," wrote Torvalds. 

"Why do you continue to make this obviously garbage argument?"

According to Torvalds, the page cache serves its correct purpose as a cache. 

"The key word in the 'page cache' name is 'cache'," wrote Torvalds.

Chinner had been debating the role of the page cache in an open email thread, commenting that "the page cache simply isn't designed to allow atomic range operations to be performed" and that he and fellow developers haven't been able "to drag it out of the 1980s". 

"We wrote the fs/iomap.c code so we could do range-based extent mapping for IOs rather than the horrible, inefficient page-by-page block mapping the generic page cache code does – that gave us a 30+ percent increase in buffered IO throughput because we only do a single mapping lookup per IO rather than one per page…," wrote Chinner. 

Torvalds didn't buy the argument and said anyone peddling this idea was "incompetent".  

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

"When you say 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."

SEE: How to build a successful developer career (free PDF)

Chinner, in response to Torvalds comment that "caches work, Dave", reminded the Linux kingpin about his commitment to "civil discussion" and attempting to create a professional environment for kernel developers.

"Yes, they do," replied Chinner. "I see plenty of cases where the page cache works just fine because it is still faster than most storage. But that's not what I said."

Chinner said Torvalds hadn't even bothered to ask him to clarify what he was referring to in the statement Torvalds quoted. 

"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," Chinner said.

"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."

More on Linux Torvalds and Linux

Editorial standards