参照元†
- LRU listの種類。
- 0: LRU_INACTIVE_ANON = LRU_BASE = 0
- 1: LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE = 0 + 1
- 2: LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE = 0 + 2
- 3: LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE = 0 + 1 + 2
- 4: LRU_UNEVICTABLE
/*
* We do arithmetic on the LRU lists in various places in the code,
* so it is important to keep the active lists LRU_ACTIVE higher in
* the array than the corresponding inactive lists, and to keep
* the *_FILE lists LRU_FILE higher than the corresponding _ANON lists.
*
* This has to be kept in sync with the statistics in zone_stat_item
* above and the descriptions in vmstat_text in mm/vmstat.c
*/
#define LRU_BASE 0
#define LRU_ACTIVE 1
#define LRU_FILE 2
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
};
コメント†