]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: do not use vmalloc for mem_cgroup allocations
authorVladimir Davydov <vdavydov@parallels.com>
Thu, 23 Jan 2014 23:52:52 +0000 (15:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:50 +0000 (16:36 -0800)
commitdddc24a5dad7abe22a01261855aa3b9f1b86f627
tree7a499bd6b46d154be870584ccd99a23c6612587c
parent5df73b0a907c0f40df344511793f167d400dd3c8
memcg: do not use vmalloc for mem_cgroup allocations

The vmalloc was introduced by 3764c86d846d ("memcgroup: use vmalloc for
mem_cgroup allocation"), because at that time MAX_NUMNODES was used for
defining the per-node array in the mem_cgroup structure so that the
structure could be huge even if the system had the only NUMA node.

The situation was significantly improved by commit e6e83881fade ("memcg:
reduce the size of struct memcg 244-fold"), which made the size of the
mem_cgroup structure calculated dynamically depending on the real number
of NUMA nodes installed on the system (nr_node_ids), so now there is no
point in using vmalloc here: the structure is allocated rarely and on
most systems its size is about 1K.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: 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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c