转自Robert Love的回答,看完之后,瞬间清晰:
Originally Answered: In Linux, what is the major difference between the buffer cache and the page cache? Why were they separate entities in older kernels? Why were they merged later on?
The page cache caches pages of files to optimize file I/O. The buffer cache caches disk blocks to optimize block I/O.
Prior to Linux kernel version 2.4, the two caches were distinct: Files were in the page cache, disk blocks were in the buffer cache. Given that most files are represented by a filesystem on a disk, data was represented twice, once in each of the caches. Many Unix systems follow a similar pattern.
This is simple to implement, but with an obvious inelegance and inefficiency. Starting with Linux kernel version 2