aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/controllers
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2008-02-07 03:14:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 11:42:22 -0500
commitdfc05c259e424e4160c66eab728f55cc4b53fd75 (patch)
tree0bf6a57cd6380db627cb008223184e935ca311b6 /Documentation/controllers
parent3c541e14bfa553133c3473a6ed3e4c0583ea2285 (diff)
update Documentation/controller/memory.txt
Documentation updates for memory controller. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/controllers')
-rw-r--r--Documentation/controllers/memory.txt33
1 files changed, 17 insertions, 16 deletions
diff --git a/Documentation/controllers/memory.txt b/Documentation/controllers/memory.txt
index 61df8f81c803..b5bbea92a61a 100644
--- a/Documentation/controllers/memory.txt
+++ b/Documentation/controllers/memory.txt
@@ -9,8 +9,7 @@ d. Provides a double LRU: global memory pressure causes reclaim from the
9 global LRU; a cgroup on hitting a limit, reclaims from the per 9 global LRU; a cgroup on hitting a limit, reclaims from the per
10 cgroup LRU 10 cgroup LRU
11 11
12NOTE: Page Cache (unmapped) also includes Swap Cache pages as a subset 12NOTE: Swap Cache (unmapped) is not accounted now.
13and will not be referred to explicitly in the rest of the documentation.
14 13
15Benefits and Purpose of the memory controller 14Benefits and Purpose of the memory controller
16 15
@@ -144,7 +143,7 @@ list.
144The memory controller uses the following hierarchy 143The memory controller uses the following hierarchy
145 144
1461. zone->lru_lock is used for selecting pages to be isolated 1451. zone->lru_lock is used for selecting pages to be isolated
1472. mem->lru_lock protects the per cgroup LRU 1462. mem->per_zone->lru_lock protects the per cgroup LRU (per zone)
1483. lock_page_cgroup() is used to protect page->page_cgroup 1473. lock_page_cgroup() is used to protect page->page_cgroup
149 148
1503. User Interface 1493. User Interface
@@ -193,6 +192,15 @@ this file after a write to guarantee the value committed by the kernel.
193The memory.failcnt field gives the number of times that the cgroup limit was 192The memory.failcnt field gives the number of times that the cgroup limit was
194exceeded. 193exceeded.
195 194
195The memory.stat file gives accounting information. Now, the number of
196caches, RSS and Active pages/Inactive pages are shown.
197
198The memory.force_empty gives an interface to drop *all* charges by force.
199
200# echo -n 1 > memory.force_empty
201
202will drop all charges in cgroup. Currently, this is maintained for test.
203
1964. Testing 2044. Testing
197 205
198Balbir posted lmbench, AIM9, LTP and vmmstress results [10] and [11]. 206Balbir posted lmbench, AIM9, LTP and vmmstress results [10] and [11].
@@ -222,11 +230,8 @@ reclaimed.
222 230
223A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a 231A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a
224cgroup might have some charge associated with it, even though all 232cgroup might have some charge associated with it, even though all
225tasks have migrated away from it. If some pages are still left, after following 233tasks have migrated away from it. Such charges are automatically dropped at
226the steps listed in sections 4.1 and 4.2, check the Swap Cache usage in 234rmdir() if there are no tasks.
227/proc/meminfo to see if the Swap Cache usage is showing up in the
228cgroups memory.usage_in_bytes counter. A simple test of swapoff -a and
229swapon -a should free any pending Swap Cache usage.
230 235
2314.4 Choosing what to account -- Page Cache (unmapped) vs RSS (mapped)? 2364.4 Choosing what to account -- Page Cache (unmapped) vs RSS (mapped)?
232 237
@@ -238,15 +243,11 @@ echo -n 1 > memory.control_type
2385. TODO 2435. TODO
239 244
2401. Add support for accounting huge pages (as a separate controller) 2451. Add support for accounting huge pages (as a separate controller)
2412. Improve the user interface to accept/display memory limits in KB or MB 2462. Make per-cgroup scanner reclaim not-shared pages first
242 rather than pages (since page sizes can differ across platforms/machines). 2473. Teach controller to account for shared-pages
2433. Make cgroup lists per-zone 2484. Start reclamation when the limit is lowered
2444. Make per-cgroup scanner reclaim not-shared pages first 2495. Start reclamation in the background when the limit is
2455. Teach controller to account for shared-pages
2466. Start reclamation when the limit is lowered
2477. Start reclamation in the background when the limit is
248 not yet hit but the usage is getting closer 250 not yet hit but the usage is getting closer
2498. Create per zone LRU lists per cgroup
250 251
251Summary 252Summary
252 253