linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] memcg: fix memcg_size() calculation
@ 2013-12-14  8:15 Vladimir Davydov
  2013-12-14  8:15 ` [PATCH 2/2] memcg: do not use vmalloc for mem_cgroup allocations Vladimir Davydov
  2013-12-16 16:47 ` [PATCH 1/2] memcg: fix memcg_size() calculation Michal Hocko
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Davydov @ 2013-12-14  8:15 UTC (permalink / raw)
  To: mhocko
  Cc: glommer, linux-kernel, cgroups, linux-mm, devel, Glauber Costa,
	Johannes Weiner, Balbir Singh, KAMEZAWA Hiroyuki

The mem_cgroup structure contains nr_node_ids pointers to
mem_cgroup_per_node objects, not the objects themselves.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Glauber Costa <glommer@openvz.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 mm/memcontrol.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index bf5e894..7f1a356 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -338,7 +338,7 @@ struct mem_cgroup {
 static size_t memcg_size(void)
 {
 	return sizeof(struct mem_cgroup) +
-		nr_node_ids * sizeof(struct mem_cgroup_per_node);
+		nr_node_ids * sizeof(struct mem_cgroup_per_node *);
 }
 
 /* internal only representation about the status of kmem accounting. */
-- 
1.7.10.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] 7+ messages in thread

end of thread, other threads:[~2013-12-17  8:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14  8:15 [PATCH 1/2] memcg: fix memcg_size() calculation Vladimir Davydov
2013-12-14  8:15 ` [PATCH 2/2] memcg: do not use vmalloc for mem_cgroup allocations Vladimir Davydov
2013-12-14 20:13   ` [Devel] " Vladimir Davydov
2013-12-16 16:53   ` Michal Hocko
2013-12-16 16:47 ` [PATCH 1/2] memcg: fix memcg_size() calculation Michal Hocko
2013-12-17  7:48   ` Glauber Costa
2013-12-17  8:12     ` Michal Hocko

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).