内核主要有4种LRU链表:
enum lru_list {
LRU_INACTIVE_ANON = LRU_BASE,
LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE,
LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE,
LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE,
LRU_UNEVICTABLE,
NR_LRU_LISTS
};
inactive_anon - # anonymous and swap cache memory on inactive LRU list.
active_anon - #anonymous and swap cache memory on active LRU list.
inactive_file - # file-backed memory on inactive LRU list.
active_file - # file-backed memory on active LRU list.
内核回收内存时,会在get_scan_out中计算每个链表中回收的page数量:
标签:FILE,memory,list,回收,LRU,内核,file,linux,active From: https://www.cnblogs.com/gaoyuechen/p/17380891.html