Thread (8 messages) 8 messages, 4 authors, 2011-05-20
STALE5532d REVIEWED: 1 (0M)

[PATCH V4 2/3] memcg: fix a routine for counting pages in node

From: Ying Han <hidden>
Date: 2011-05-20 03:25:30
Subsystem: control group - memory resource controller (memcg), memory management, the rest · Maintainers: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt, Andrew Morton, Linus Torvalds

The value for counter base should be initialized. If not,
this returns wrong value.

This is a bugfix for memcg-reclaim-memory-from-nodes-in-round-robin-order.patch
in mmotm tree.

Signed-off-by: KAMEZAWA Hiroyuki <redacted>
Acked-by: Daisuke Nishimura <redacted>
Signed-off-by: Ying Han <redacted>
---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index da183dc..e14677c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -679,7 +679,7 @@ static unsigned long
 mem_cgroup_get_zonestat_node(struct mem_cgroup *mem, int nid, enum lru_list idx)
 {
 	struct mem_cgroup_per_zone *mz;
-	u64 total;
+	u64 total = 0;
 	int zid;
 
 	for (zid = 0; zid < MAX_NR_ZONES; zid++) {
-- 
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help