Bullshit, Dave. (Re: pagecache locking)
From LinuxReviews
Jump to navigationJump to searchLinus Torvalds had a few things to say about a claim that "the page cache is still far, far slower than direct IO" in June 2019.
From Linus Torvalds <> Date Thu, 13 Jun 2019 16:30:36 -1000 Subject Re: pagecache locking (was: bcachefs status update) merged) On Thu, Jun 13, 2019 at 1:56 PM Dave Chinner <david@fromorbit.com> wrote: > > That said, the page cache is still far, far slower than direct IO, Bullshit, Dave. You've made that claim before, and it's been complete bullshit before too, and I've called you out on it then too. Why do you continue to make this obviously garbage argument? The key word in the "page cache" name is "cache". Caches work, Dave. 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. So you're making that statement without taking into account all the cases that you don't see, and that you don't care about, because the page cache has already handled them for you, and done so much better than DIO can do or ever _will_ do. Is direct IO faster when you *know* it's not cached, and shouldn't be cached? Sure. But that/s actually quite rare. How often do you use non-temporal stores when you do non-IO programming? Approximately never, perhaps? Because caches work. And no, SSD's haven't made caches irrelevant. Not doing IO at all is still orders of magnitude faster than doing IO. And it's not clear nvdimms will either. So stop with the stupid and dishonest argument already, where you ignore the effects of caching. Linus
See also: Linus Still Based and Caches Are Faster than Direct IO