diff options
author | Namhyung Kim <namhyung@gmail.com> | 2011-05-26 19:25:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:35 -0400 |
commit | 268433b8e54486b12478e94ba18587bcc7de4d57 (patch) | |
tree | 02686a62751fbdd2ad3125a53952c09381d7ac72 /mm | |
parent | 39cc98f1f8aa949afeea89f424c7494b0785d7da (diff) |
memcg: mark init_section_page_cgroup() properly
Commit ca371c0d7e23 ("memcg: fix page_cgroup fatal error in FLATMEM")
removes call to alloc_bootmem() in the function so that it can be marked
as __meminit to reduce memory usage when MEMORY_HOTPLUG=n.
Also as the new helper function alloc_page_cgroup() is called only in the
function, it should be marked too.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index 2daadc322ba6..4eb05302e2e1 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c | |||
@@ -130,7 +130,7 @@ struct page *lookup_cgroup_page(struct page_cgroup *pc) | |||
130 | return page; | 130 | return page; |
131 | } | 131 | } |
132 | 132 | ||
133 | static void *__init_refok alloc_page_cgroup(size_t size, int nid) | 133 | static void *__meminit alloc_page_cgroup(size_t size, int nid) |
134 | { | 134 | { |
135 | void *addr = NULL; | 135 | void *addr = NULL; |
136 | 136 | ||
@@ -162,7 +162,7 @@ static void free_page_cgroup(void *addr) | |||
162 | } | 162 | } |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | static int __init_refok init_section_page_cgroup(unsigned long pfn) | 165 | static int __meminit init_section_page_cgroup(unsigned long pfn) |
166 | { | 166 | { |
167 | struct page_cgroup *base, *pc; | 167 | struct page_cgroup *base, *pc; |
168 | struct mem_section *section; | 168 | struct mem_section *section; |