linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [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

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