* [PATCH] memcg: update document to mention swapoff should be test.
@ 2009-01-19 6:57 KAMEZAWA Hiroyuki
2009-01-19 7:12 ` Balbir Singh
0 siblings, 1 reply; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-19 6:57 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
Cc: balbir@linux.vnet.ibm.com, nishimura@mxp.nes.nec.co.jp,
lizf@cn.fujitsu.com, linux-mm@kvack.org,
akpm@linux-foundation.org
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Considering recently found problem:
memcg-fix-refcnt-handling-at-swapoff.patch
It's better to mention about swapoff behavior in memcg_test document.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
Documentation/cgroups/memcg_test.txt | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
Index: mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
===================================================================
--- mmotm-2.6.29-Jan16.orig/Documentation/cgroups/memcg_test.txt
+++ mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
@@ -1,6 +1,6 @@
Memory Resource Controller(Memcg) Implementation Memo.
-Last Updated: 2008/12/15
-Base Kernel Version: based on 2.6.28-rc8-mm.
+Last Updated: 2009/1/19
+Base Kernel Version: based on 2.6.29-rc2.
Because VM is getting complex (one of reasons is memcg...), memcg's behavior
is complex. This is a document for memcg's internal behavior.
@@ -340,3 +340,23 @@ Under below explanation, we assume CONFI
# mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices
and do task move, mkdir, rmdir etc...under this.
+
+ 9.7 swapoff.
+ Besides management of swap is one of complicated parts of memcg,
+ call path of swap-in at swapoff is not same as usual swap-in path..
+ It's worth to be tested explicitly.
+
+ For example, test like following is good.
+ (Shell-A)
+ # mount -t cgroup none /cgroup -t memory
+ # mkdir /cgroup/test
+ # echo 40M > /cgroup/test/memory.limit_in_bytes
+ # echo 0 > /cgroup/test/tasks
+ Run malloc(100M) program under this. You'll see 60M of swaps.
+ (Shell-B)
+ # move all tasks in /cgroup/test to /cgroup
+ # /sbin/swapoff -a
+ # rmdir /test/cgroup
+ # kill malloc task.
+
+ Of course, tmpfs v.s. swapoff test should be tested, too.
--
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] memcg: update document to mention swapoff should be test.
2009-01-19 6:57 [PATCH] memcg: update document to mention swapoff should be test KAMEZAWA Hiroyuki
@ 2009-01-19 7:12 ` Balbir Singh
2009-01-19 7:15 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 4+ messages in thread
From: Balbir Singh @ 2009-01-19 7:12 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: linux-kernel@vger.kernel.org, nishimura@mxp.nes.nec.co.jp,
lizf@cn.fujitsu.com, linux-mm@kvack.org,
akpm@linux-foundation.org
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-01-19 15:57:48]:
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> Considering recently found problem:
> memcg-fix-refcnt-handling-at-swapoff.patch
>
> It's better to mention about swapoff behavior in memcg_test document.
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
> Documentation/cgroups/memcg_test.txt | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
>
> Index: mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
> ===================================================================
> --- mmotm-2.6.29-Jan16.orig/Documentation/cgroups/memcg_test.txt
> +++ mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
> @@ -1,6 +1,6 @@
> Memory Resource Controller(Memcg) Implementation Memo.
> -Last Updated: 2008/12/15
> -Base Kernel Version: based on 2.6.28-rc8-mm.
> +Last Updated: 2009/1/19
> +Base Kernel Version: based on 2.6.29-rc2.
>
> Because VM is getting complex (one of reasons is memcg...), memcg's behavior
> is complex. This is a document for memcg's internal behavior.
> @@ -340,3 +340,23 @@ Under below explanation, we assume CONFI
> # mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices
>
> and do task move, mkdir, rmdir etc...under this.
> +
> + 9.7 swapoff.
> + Besides management of swap is one of complicated parts of memcg,
> + call path of swap-in at swapoff is not same as usual swap-in path..
> + It's worth to be tested explicitly.
> +
> + For example, test like following is good.
> + (Shell-A)
> + # mount -t cgroup none /cgroup -t memory
> + # mkdir /cgroup/test
> + # echo 40M > /cgroup/test/memory.limit_in_bytes
> + # echo 0 > /cgroup/test/tasks
0? shouldn't this be pid? Potentially echo $$
> + Run malloc(100M) program under this. You'll see 60M of swaps.
> + (Shell-B)
> + # move all tasks in /cgroup/test to /cgroup
> + # /sbin/swapoff -a
> + # rmdir /test/cgroup
> + # kill malloc task.
> +
> + Of course, tmpfs v.s. swapoff test should be tested, too.
>
--
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] memcg: update document to mention swapoff should be test.
2009-01-19 7:12 ` Balbir Singh
@ 2009-01-19 7:15 ` KAMEZAWA Hiroyuki
2009-01-19 8:34 ` Balbir Singh
0 siblings, 1 reply; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-01-19 7:15 UTC (permalink / raw)
To: balbir
Cc: linux-kernel@vger.kernel.org, nishimura@mxp.nes.nec.co.jp,
lizf@cn.fujitsu.com, linux-mm@kvack.org,
akpm@linux-foundation.org
On Mon, 19 Jan 2009 12:42:20 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-01-19 15:57:48]:
>
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
> > Considering recently found problem:
> > memcg-fix-refcnt-handling-at-swapoff.patch
> >
> > It's better to mention about swapoff behavior in memcg_test document.
> >
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > ---
> > Documentation/cgroups/memcg_test.txt | 24 ++++++++++++++++++++++--
> > 1 file changed, 22 insertions(+), 2 deletions(-)
> >
> > Index: mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
> > ===================================================================
> > --- mmotm-2.6.29-Jan16.orig/Documentation/cgroups/memcg_test.txt
> > +++ mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
> > @@ -1,6 +1,6 @@
> > Memory Resource Controller(Memcg) Implementation Memo.
> > -Last Updated: 2008/12/15
> > -Base Kernel Version: based on 2.6.28-rc8-mm.
> > +Last Updated: 2009/1/19
> > +Base Kernel Version: based on 2.6.29-rc2.
> >
> > Because VM is getting complex (one of reasons is memcg...), memcg's behavior
> > is complex. This is a document for memcg's internal behavior.
> > @@ -340,3 +340,23 @@ Under below explanation, we assume CONFI
> > # mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices
> >
> > and do task move, mkdir, rmdir etc...under this.
> > +
> > + 9.7 swapoff.
> > + Besides management of swap is one of complicated parts of memcg,
> > + call path of swap-in at swapoff is not same as usual swap-in path..
> > + It's worth to be tested explicitly.
> > +
> > + For example, test like following is good.
> > + (Shell-A)
> > + # mount -t cgroup none /cgroup -t memory
> > + # mkdir /cgroup/test
> > + # echo 40M > /cgroup/test/memory.limit_in_bytes
> > + # echo 0 > /cgroup/test/tasks
>
> 0? shouldn't this be pid? Potentially echo $$
>
0 is handled as $$ in cgroup/tasks file.
-Kame
--
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] memcg: update document to mention swapoff should be test.
2009-01-19 7:15 ` KAMEZAWA Hiroyuki
@ 2009-01-19 8:34 ` Balbir Singh
0 siblings, 0 replies; 4+ messages in thread
From: Balbir Singh @ 2009-01-19 8:34 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: linux-kernel@vger.kernel.org, nishimura@mxp.nes.nec.co.jp,
lizf@cn.fujitsu.com, linux-mm@kvack.org,
akpm@linux-foundation.org
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-01-19 16:15:08]:
> On Mon, 19 Jan 2009 12:42:20 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-01-19 15:57:48]:
> >
> > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > >
> > > Considering recently found problem:
> > > memcg-fix-refcnt-handling-at-swapoff.patch
> > >
> > > It's better to mention about swapoff behavior in memcg_test document.
> > >
> > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > ---
> > > Documentation/cgroups/memcg_test.txt | 24 ++++++++++++++++++++++--
> > > 1 file changed, 22 insertions(+), 2 deletions(-)
> > >
> > > Index: mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
> > > ===================================================================
> > > --- mmotm-2.6.29-Jan16.orig/Documentation/cgroups/memcg_test.txt
> > > +++ mmotm-2.6.29-Jan16/Documentation/cgroups/memcg_test.txt
> > > @@ -1,6 +1,6 @@
> > > Memory Resource Controller(Memcg) Implementation Memo.
> > > -Last Updated: 2008/12/15
> > > -Base Kernel Version: based on 2.6.28-rc8-mm.
> > > +Last Updated: 2009/1/19
> > > +Base Kernel Version: based on 2.6.29-rc2.
> > >
> > > Because VM is getting complex (one of reasons is memcg...), memcg's behavior
> > > is complex. This is a document for memcg's internal behavior.
> > > @@ -340,3 +340,23 @@ Under below explanation, we assume CONFI
> > > # mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices
> > >
> > > and do task move, mkdir, rmdir etc...under this.
> > > +
> > > + 9.7 swapoff.
> > > + Besides management of swap is one of complicated parts of memcg,
> > > + call path of swap-in at swapoff is not same as usual swap-in path..
> > > + It's worth to be tested explicitly.
> > > +
> > > + For example, test like following is good.
> > > + (Shell-A)
> > > + # mount -t cgroup none /cgroup -t memory
> > > + # mkdir /cgroup/test
> > > + # echo 40M > /cgroup/test/memory.limit_in_bytes
> > > + # echo 0 > /cgroup/test/tasks
> >
> > 0? shouldn't this be pid? Potentially echo $$
> >
>
> 0 is handled as $$ in cgroup/tasks file.
>
OK, I remember having the 0 discussion for cgroups. Thanks for
clarifying. The test looks good, 0 is a bit confusing, since it is a
valid pid not visible to user space... but that is already done and
closed. Hence,
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
--
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
end of thread, other threads:[~2009-01-19 8:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 6:57 [PATCH] memcg: update document to mention swapoff should be test KAMEZAWA Hiroyuki
2009-01-19 7:12 ` Balbir Singh
2009-01-19 7:15 ` KAMEZAWA Hiroyuki
2009-01-19 8:34 ` Balbir Singh
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).