]> Git Repo - linux.git/commitdiff
memcg: update memcg_test.txt to describe memory thresholds
authorKirill A. Shutemov <[email protected]>
Wed, 10 Mar 2010 23:22:36 +0000 (15:22 -0800)
committerLinus Torvalds <[email protected]>
Fri, 12 Mar 2010 23:52:38 +0000 (15:52 -0800)
Decription of sanity check for memory thresholds.

Signed-off-by: Kirill A. Shutemov <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Dan Malek <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Documentation/cgroups/memcg_test.txt

index e01148886b5b8df8f2812f5823f68a09bdeb7408..4d32e0ed191798588a4028d3756e2f5e16422d0e 100644 (file)
@@ -396,3 +396,24 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
        memory.stat of both A and B.
        See 8.2 of Documentation/cgroups/memory.txt to see what value should be
        written to move_charge_at_immigrate.
+
+ 9.10 Memory thresholds
+       Memory controler implements memory thresholds using cgroups notification
+       API. You can use Documentation/cgroups/cgroup_event_listener.c to test
+       it.
+
+       (Shell-A) Create cgroup and run event listener
+       # mkdir /cgroup/A
+       # ./cgroup_event_listener /cgroup/A/memory.usage_in_bytes 5M
+
+       (Shell-B) Add task to cgroup and try to allocate and free memory
+       # echo $$ >/cgroup/A/tasks
+       # a="$(dd if=/dev/zero bs=1M count=10)"
+       # a=
+
+       You will see message from cgroup_event_listener every time you cross
+       the thresholds.
+
+       Use /cgroup/A/memory.memsw.usage_in_bytes to test memsw thresholds.
+
+       It's good idea to test root cgroup as well.
This page took 0.0519579999999999 seconds and 4 git commands to generate.