Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187226
b: refs/heads/master
c: 1080d7a
h: refs/heads/master
v: v3
  • Loading branch information
Daisuke Nishimura authored and Linus Torvalds committed Mar 12, 2010
1 parent 5e95698 commit 3e1ab1a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2265e6fa3f220ea5fd37522d13390e9675adcf7
refs/heads/master: 1080d7a30304d03b1d9fd530aacd8aece2d702a2
22 changes: 20 additions & 2 deletions trunk/Documentation/cgroups/memcg_test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Memory Resource Controller(Memcg) Implementation Memo.
Last Updated: 2009/1/20
Base Kernel Version: based on 2.6.29-rc2.
Last Updated: 2010/2
Base Kernel Version: based on 2.6.33-rc7-mm(candidate for 34).

Because VM is getting complex (one of reasons is memcg...), memcg's behavior
is complex. This is a document for memcg's internal behavior.
Expand Down Expand Up @@ -378,3 +378,21 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
#echo 50M > memory.limit_in_bytes
#echo 50M > memory.memsw.limit_in_bytes
run 51M of malloc

9.9 Move charges at task migration
Charges associated with a task can be moved along with task migration.

(Shell-A)
#mkdir /cgroup/A
#echo $$ >/cgroup/A/tasks
run some programs which uses some amount of memory in /cgroup/A.

(Shell-B)
#mkdir /cgroup/B
#echo 1 >/cgroup/B/memory.move_charge_at_immigrate
#echo "pid of the program running in group A" >/cgroup/B/tasks

You can see charges have been moved by reading *.usage_in_bytes or
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.

0 comments on commit 3e1ab1a

Please sign in to comment.