linux make virtual memory more efficient three components

Page Cache

  This is used to speed up access to images and data on disk. As pages are read into memory from disk they are cached in the page cache. If they were discarded and then needed again they can quickly be fetched from this cachegif.

   页缓存,为了加速从硬盘当中读取数据。

Buffer Cache

  Pages may contain data buffers being used by the kernel, device drivers and so on. The buffer cache is a look aside list of buffers. If, for example, a device driver needs a 256byte buffer, it is quicker to take a buffer from the buffer cache than to allocate a physical page and then break it up into 256byte buffers.

       用于分配置给内核,设备驱动使用,如串口驱动的的读写缓冲区等,

Swap Cache

  Only written (or dirty) pages are saved in the swap file. So long as these pages are not modified after they have been written to the swap file then the next time the page is swapped out there is no need to write it to the swap file as the page is already in the swap file. Instead the page can simply be discarded. In a heavily swapping system this saves many unnecessary and costly disk operations.

  被写入交换分区的数据,下次该页会被从交换分区当中读出,不会再被写回交换分区的缓存。

原文地址:https://www.cnblogs.com/lianghong881018/p/10288601.html