Linus torvalds discussed with Dave Chinner about the speed of the kernel caching system


In computing, a cache is a memory that temporarily stores copies of data to reduce later access time. Caching can effectively reuse previously retrieved or processed data.

In Linux, the caching system is mainly called "page cache", But Direct I / O transfers can also be used. In practice, cached data is generally stored on fast-access hardware, such as RAM, and can also be used in conjunction with a software component.

In most cases, the Linux kernel refers to the "cache page" when reading from or writing to disk. New pages are added to respond to read requests from the user-mode process.

If the page is not yet in the cache, a new entry is added to the cache and is completed with the data read from the disc. If enough memory is available, the page is cached for an indefinite period of time and can be reused by other processes without accessing the disk.

Each Linux kernel designers have implemented the "cache page" to meet two main requirements.

  • First, it will allow the system to quickly locate a specific page that contains data about a specific owner. To take full advantage of the Linux cache, the search must be a very fast operation.
  • Second, redundant instructions that handle the page cache and read read-ahead will slow down read and write calls.

For these reasons, Linux offers an easy way to bypass cache pages: direct I / O transfers.

Torvalds tells Dave Chinner that his opinion is purely my ...

In a direct I / O transfer, the kernel programs the disk controller to transfer data directly to pages in the user-mode address space of an automatic caching application.

The topic has always been debated in the Linux community and has been the subject of a dispute between Linus Torvalds and a Linux kernel contributor.

In fact, in a post from the Linux kernel mailing list, Dave Chinner, an Australian programmer who manages the XFS file system created by Silicon Graphics (SGI) and supported by many Linux distributions, said page cache is still much slower than direct I / O transfers.

"For a highly competitive application that processes massive data in large files stored in high-speed storage, page cache is still much slower than direct I / O transfers," he wrote in his report. message.

Your statement matches the one mentioned above, that in some cases, such as databases, where the amount of data being cached is too large, it would be better to use a workaround: direct I / O transfers.

That said, Linus Torvalds, did not appreciate the comment of his collaborator on the subject of data caching in his operating system. The latter called Dave Chinner's words "shit" before attacking him in a long message. "You already made this request, and it was already complete shit, and I called you about that too," he said.

He noted that the keyword in "page cache" is "cache" and that it works very well. The caches work, Dave. Anyone who thinks caches are not working is incompetent. Approximately 99% of all accesses to the file system are cached, and they never do direct I / O transfers.

The page cache handles them perfectly. When you say that page cache is slower than direct I / O transfer, it's because you don't even see or care about speed of operations. This is understandable as it only steps in once information operations are done, "says Linus Torvalds on the mailing list.

For him, anyone who opposes this idea knows absolutely nothing and Dave Chinner is one of them.

“You make this statement without taking into account all the cases that you do not see and that do not interest you because the page cache has already handled them for you. It is much better than direct I / O transfers. How often do you use non-time stores when programming without IO? Almost never, maybe? Because caches work. "So stop with your stupid and dishonest argument, where you ignore the effects of caching," Torvalds continued.

Somewhere in your message Dave Chinner explained that page cache limits are becoming more noticeable as SSDs become more efficient.. One thing Torvalds still disagrees with.

"And no, SSDs didn't make caches useless," he said. However, in response to Torvalds' lengthy text, Chinner explained that he remains convinced that the problem he is highlighting is indeed real. For Chinner, it is true that there are many cases where the page cache works, as it is always faster than most storage systems.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

4 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Miguel Mayol said

    He wrote "bullshit" literally bull shit and figuratively referring to arguments FALACIAS that for a sensational news sounds worse and to refer to the father of the kernel "Linux is not unix" but he ate them all contemptuously, first you have to know, even languages . By the way FALLACIOUS, fallacious in English, exists but is very little used outside of an extremely formal or academic language

  2.   Oscar said

    I think it happens to Linus like the VOX people, they are right in what they say, but they lose their way.

    1.    pepper said

      For Tolvars I see that the holidays have been of little use to him, he does not seem at all relaxed with the collaborators.
      As for what he says about VOX, they do not lose their forms at any time, that is simply a lie, those who criticize him who do not know where to go lose their forms.

  3.   dfsdf said

    what a shit translation