* [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup
@ 2009-12-09 15:48 Kirill A. Shutemov
2009-12-09 16:11 ` Daisuke Nishimura
2009-12-09 23:59 ` KAMEZAWA Hiroyuki
0 siblings, 2 replies; 6+ messages in thread
From: Kirill A. Shutemov @ 2009-12-09 15:48 UTC (permalink / raw)
To: linux-mm
Cc: KAMEZAWA Hiroyuki, Balbir Singh, Pavel Emelyanov, linux-kernel,
Kirill A. Shutemov, stable
We really want to take MEM_CGROUP_STAT_SWAPOUT into account.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: stable@kernel.org
---
mm/memcontrol.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f99f599..6314015 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2541,6 +2541,7 @@ static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
val += idx_val;
mem_cgroup_get_recursive_idx_stat(mem,
MEM_CGROUP_STAT_SWAPOUT, &idx_val);
+ val += idx_val;
val <<= PAGE_SHIFT;
} else
val = res_counter_read_u64(&mem->memsw, name);
--
1.6.5.3
--
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] 6+ messages in thread
* Re: [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup
2009-12-09 15:48 [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup Kirill A. Shutemov
@ 2009-12-09 16:11 ` Daisuke Nishimura
2009-12-09 23:59 ` KAMEZAWA Hiroyuki
1 sibling, 0 replies; 6+ messages in thread
From: Daisuke Nishimura @ 2009-12-09 16:11 UTC (permalink / raw)
To: Kirill A. Shutemov
Cc: Andrew Morton, linux-mm, KAMEZAWA Hiroyuki, Balbir Singh,
Pavel Emelyanov, linux-kernel, stable, nishimura
(Added Cc: Andrew Morton <akpm@linux-foundation.org>)
On Wed, 9 Dec 2009 17:48:58 +0200
"Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> We really want to take MEM_CGROUP_STAT_SWAPOUT into account.
>
Nice catch!
Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: stable@kernel.org
> ---
> mm/memcontrol.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index f99f599..6314015 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2541,6 +2541,7 @@ static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
> val += idx_val;
> mem_cgroup_get_recursive_idx_stat(mem,
> MEM_CGROUP_STAT_SWAPOUT, &idx_val);
> + val += idx_val;
> val <<= PAGE_SHIFT;
> } else
> val = res_counter_read_u64(&mem->memsw, name);
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] 6+ messages in thread
* Re: [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup
2009-12-09 15:48 [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup Kirill A. Shutemov
2009-12-09 16:11 ` Daisuke Nishimura
@ 2009-12-09 23:59 ` KAMEZAWA Hiroyuki
2009-12-10 0:21 ` Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-12-09 23:59 UTC (permalink / raw)
To: Kirill A. Shutemov
Cc: linux-mm, Balbir Singh, Pavel Emelyanov, linux-kernel, stable
On Wed, 9 Dec 2009 17:48:58 +0200
"Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> We really want to take MEM_CGROUP_STAT_SWAPOUT into account.
>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: stable@kernel.org
Thanks.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--
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] 6+ messages in thread
* Re: [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup
2009-12-09 23:59 ` KAMEZAWA Hiroyuki
@ 2009-12-10 0:21 ` Andrew Morton
2009-12-10 1:13 ` KAMEZAWA Hiroyuki
2009-12-10 1:16 ` Daisuke Nishimura
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2009-12-10 0:21 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Kirill A. Shutemov, linux-mm, Balbir Singh, Pavel Emelyanov,
linux-kernel, stable, Daisuke Nishimura
On Thu, 10 Dec 2009 08:59:29 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Wed, 9 Dec 2009 17:48:58 +0200
> "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
>
> > We really want to take MEM_CGROUP_STAT_SWAPOUT into account.
> >
> > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > Cc: stable@kernel.org
>
> Thanks.
>
> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
Is this bug sufficiently serious to justify a -stable backport?
If so, why?
Thanks.
--
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] 6+ messages in thread
* Re: [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup
2009-12-10 0:21 ` Andrew Morton
@ 2009-12-10 1:13 ` KAMEZAWA Hiroyuki
2009-12-10 1:16 ` Daisuke Nishimura
1 sibling, 0 replies; 6+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-12-10 1:13 UTC (permalink / raw)
To: Andrew Morton
Cc: Kirill A. Shutemov, linux-mm, Balbir Singh, Pavel Emelyanov,
linux-kernel, stable, Daisuke Nishimura
On Wed, 9 Dec 2009 16:21:09 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Thu, 10 Dec 2009 08:59:29 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> > On Wed, 9 Dec 2009 17:48:58 +0200
> > "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> >
> > > We really want to take MEM_CGROUP_STAT_SWAPOUT into account.
> > >
> > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > > Cc: stable@kernel.org
> >
> > Thanks.
> >
> > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
>
> Is this bug sufficiently serious to justify a -stable backport?
>
I think so.
> If so, why?
>
memory cgroup has a file memory.memsw.usage_in_bytes file. It shows sum of
the usage of pages and swapents in the cgroup. Now, root cgroup's
memsw.usage_in_bytes shows wrong value....the number of swapents are not
added. This patch fixesi it.
Thanks,
-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] 6+ messages in thread
* Re: [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup
2009-12-10 0:21 ` Andrew Morton
2009-12-10 1:13 ` KAMEZAWA Hiroyuki
@ 2009-12-10 1:16 ` Daisuke Nishimura
1 sibling, 0 replies; 6+ messages in thread
From: Daisuke Nishimura @ 2009-12-10 1:16 UTC (permalink / raw)
To: Andrew Morton
Cc: nishimura, KAMEZAWA Hiroyuki, Kirill A. Shutemov, linux-mm,
Balbir Singh, Pavel Emelyanov, linux-kernel, stable
On Wed, 9 Dec 2009 16:21:09 -0800, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Thu, 10 Dec 2009 08:59:29 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> > On Wed, 9 Dec 2009 17:48:58 +0200
> > "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> >
> > > We really want to take MEM_CGROUP_STAT_SWAPOUT into account.
> > >
> > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > > Cc: stable@kernel.org
> >
> > Thanks.
> >
> > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> >
>
> Is this bug sufficiently serious to justify a -stable backport?
>
> If so, why?
>
Well, the value of <root cgroup>/memory.memsw.usage_in_bytes would be incorrect
(swap usage would not be counted) without this patch. So the impact of this bug
depends on how the value is used.
Anyway, this bug exists only in 2.6.32 and this patch can be applied onto it
without any change.
Thanks,
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] 6+ messages in thread
end of thread, other threads:[~2009-12-10 1:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-09 15:48 [PATCH] [TRIVIAL] memcg: fix memory.memsw.usage_in_bytes for root cgroup Kirill A. Shutemov
2009-12-09 16:11 ` Daisuke Nishimura
2009-12-09 23:59 ` KAMEZAWA Hiroyuki
2009-12-10 0:21 ` Andrew Morton
2009-12-10 1:13 ` KAMEZAWA Hiroyuki
2009-12-10 1:16 ` Daisuke Nishimura
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox