#author("2025-09-11T20:49:32+09:00","default:guest","guest")
#author("2025-09-11T20:54:06+09:00","default:guest","guest")
*参照元 [#u3e4ce26]
#backlinks

*説明 [#hfe4e0ce]
-パス: [[linux-5.15/include/linux/mmzone.h]]

-LRU listの種類。5つある。
-- 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
--[[linux-5.15/メモリ管理]]

-LRUリストに繋がっているページ数を確認するには/proc/zoneinfoの各ゾーンに表示されている、以下の項目を見る。数字は適当。
--nr_zone_inactive_anon 6000
--nr_zone_active_anon 5900
--nr_zone_inactive_file 100000
--nr_zone_active_file 3000
--nr_zone_unevictable 0


**参考 [#we1ab751]


*実装 [#w313d3f7]

 /*
  * 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
 };


*コメント [#q4770966]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS