linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -mmotm] memcg: update memcg_test.txt
       [not found] <20100203110048.6c8f66c4.kamezawa.hiroyu@jp.fujitsu.com>
@ 2010-02-15  0:49 ` Daisuke Nishimura
  2010-02-15  1:21   ` KAMEZAWA Hiroyuki
  2010-02-15  7:26   ` Balbir Singh
  0 siblings, 2 replies; 4+ messages in thread
From: Daisuke Nishimura @ 2010-02-15  0:49 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Balbir Singh, KAMEZAWA Hiroyuki,
	Kirill A. Shutemov, Daisuke Nishimura

Update memcg_test.txt to describe how to test the move-charge feature.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
---
 Documentation/cgroups/memcg_test.txt |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
index 72db89e..e011488 100644
--- a/Documentation/cgroups/memcg_test.txt
+++ b/Documentation/cgroups/memcg_test.txt
@@ -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.
@@ -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.
-- 
1.6.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -mmotm] memcg: update memcg_test.txt
  2010-02-15  0:49 ` [PATCH -mmotm] memcg: update memcg_test.txt Daisuke Nishimura
@ 2010-02-15  1:21   ` KAMEZAWA Hiroyuki
  2010-02-15  7:26   ` Balbir Singh
  1 sibling, 0 replies; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-02-15  1:21 UTC (permalink / raw)
  To: Daisuke Nishimura
  Cc: linux-mm, Andrew Morton, Balbir Singh, Kirill A. Shutemov

On Mon, 15 Feb 2010 09:49:13 +0900
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:

> Update memcg_test.txt to describe how to test the move-charge feature.
> 
> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>

Thank you !!
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

> ---
>  Documentation/cgroups/memcg_test.txt |   22 ++++++++++++++++++++--
>  1 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
> index 72db89e..e011488 100644
> --- a/Documentation/cgroups/memcg_test.txt
> +++ b/Documentation/cgroups/memcg_test.txt
> @@ -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.
> @@ -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.
> -- 
> 1.6.4
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mmotm] memcg: update memcg_test.txt
  2010-02-15  0:49 ` [PATCH -mmotm] memcg: update memcg_test.txt Daisuke Nishimura
  2010-02-15  1:21   ` KAMEZAWA Hiroyuki
@ 2010-02-15  7:26   ` Balbir Singh
  2010-02-15 23:44     ` Daisuke Nishimura
  1 sibling, 1 reply; 4+ messages in thread
From: Balbir Singh @ 2010-02-15  7:26 UTC (permalink / raw)
  To: Daisuke Nishimura
  Cc: linux-mm, Andrew Morton, KAMEZAWA Hiroyuki, Kirill A. Shutemov

* nishimura@mxp.nes.nec.co.jp <nishimura@mxp.nes.nec.co.jp> [2010-02-15 09:49:13]:

> Update memcg_test.txt to describe how to test the move-charge feature.
> 
> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
> ---
>  Documentation/cgroups/memcg_test.txt |   22 ++++++++++++++++++++--
>  1 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
> index 72db89e..e011488 100644
> --- a/Documentation/cgroups/memcg_test.txt
> +++ b/Documentation/cgroups/memcg_test.txt
> @@ -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.
> @@ -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.

Looks good to me, I would also try and ping pong task migration with
move_charges_at_immigrate enabled and check for stability as well.

Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
 

-- 
	Three Cheers,
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mmotm] memcg: update memcg_test.txt
  2010-02-15  7:26   ` Balbir Singh
@ 2010-02-15 23:44     ` Daisuke Nishimura
  0 siblings, 0 replies; 4+ messages in thread
From: Daisuke Nishimura @ 2010-02-15 23:44 UTC (permalink / raw)
  To: balbir
  Cc: linux-mm, Andrew Morton, KAMEZAWA Hiroyuki, Kirill A. Shutemov,
	Daisuke Nishimura

On Mon, 15 Feb 2010 12:56:12 +0530, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> * nishimura@mxp.nes.nec.co.jp <nishimura@mxp.nes.nec.co.jp> [2010-02-15 09:49:13]:
> 
> > Update memcg_test.txt to describe how to test the move-charge feature.
> > 
> > Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
> > ---
> >  Documentation/cgroups/memcg_test.txt |   22 ++++++++++++++++++++--
> >  1 files changed, 20 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
> > index 72db89e..e011488 100644
> > --- a/Documentation/cgroups/memcg_test.txt
> > +++ b/Documentation/cgroups/memcg_test.txt
> > @@ -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.
> > @@ -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.
> 
> Looks good to me, I would also try and ping pong task migration with
> move_charges_at_immigrate enabled and check for stability as well.
> 
Thank you. It would be a very useful test.

Regards,
Daisuke Nishimura.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-15 23:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100203110048.6c8f66c4.kamezawa.hiroyu@jp.fujitsu.com>
2010-02-15  0:49 ` [PATCH -mmotm] memcg: update memcg_test.txt Daisuke Nishimura
2010-02-15  1:21   ` KAMEZAWA Hiroyuki
2010-02-15  7:26   ` Balbir Singh
2010-02-15 23:44     ` Daisuke Nishimura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).