0

I have a little problem in understanding the working of the page-cache in linux. If I understood it right the page cache gets filled with pages the kernel recently allocated. Is it correct that, if these pages (inside the cache) are filled with data, there isn't an adress translation through the MMU required as the data is already here in the cache? So the kernel can directly access them with the virtual adress and does only have to use the MMU but only the page-table to find the data inside the cache.

I hope you can correct me. Thanks.

Chen Li
  • 4,824
  • 3
  • 28
  • 55
Marco
  • 11
  • 2
  • page-cache in Linux is **memory**(instead of cache in memory hierarchy) used to speed up file access, so they are still physical memory and are managed by MMU. – Chen Li May 15 '22 at 10:52
  • You seem to be mixing up software features (page cache) with hardware feature (CPU MMU). Those are two different and unrelated things. MMU always needs to translate every single virtual memory access. – Marco Bonelli May 15 '22 at 16:40
  • Maybe helpful. [Page table during boot](https://stackoverflow.com/questions/16688540/page-table-in-linux-kernel-space-during-boot). Page cache is in regards to swap. A page can be mapped/unmapped, but backed by a swap file. The other thing is called a 'disk cache'. – artless noise May 17 '22 at 16:22

0 Answers0