5. Cgroup ?
実は元々、”Process Container ” って名前で開発が始まった。
+/*
+ * cgroup_create_dir - create a directory for an object.
+ * cont: the cgroup we create the directory for.
+ * It must have a valid ->parent field
+ * And we are going to fill its ->dentry field.
+ * dentry: dentry of the new container
+ * mode: mode to set on new directory.
+ */
昔のコードを見ると“Container”の文字が結構あったりする
“Process Container”機能だけじゃ”Container”にならないよね?
とかそういう話もあって “Control Group”に
47. ページ回収
Page
Active/Inactiveという2つのリストでLRU管理
補充
ユーザメモリ
はActiveから
ファイル
はInactive
Page
Page
Page
Page
Page
Active List
Inactive List
Accessが無ければ
Reclaim
Access Test
Access
Test
Access有
48. LRUによるページ回収 +memory cgroup
P
P
P
P
P
P
cgroup
Active List
Inactive List
Memory cgroup毎にLRU(Active/Inactive)を持つ システム全体のLRUは存在しない。
49. 新Global LRU
P
P
P
P
P
P
cgroup
P
P
P
P
P
P
cgroup
P
P
P
P
P
P
cgroup
P
P
P
P
P
P
cgroup
現在、システムの
GLOBAL LRUは
各memory cgroup
を巡回してページ回収
を行っている
Root cgroupを起点に
Depth First Search (pre-order)
でヒエラルキーの木を探索