提交 268433b8 编写于 作者: N Namhyung Kim 提交者: Linus Torvalds

memcg: mark init_section_page_cgroup() properly

Commit ca371c0d ("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: NNamhyung Kim <namhyung@gmail.com>
Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 39cc98f1
......@@ -130,7 +130,7 @@ struct page *lookup_cgroup_page(struct page_cgroup *pc)
return page;
}
static void *__init_refok alloc_page_cgroup(size_t size, int nid)
static void *__meminit alloc_page_cgroup(size_t size, int nid)
{
void *addr = NULL;
......@@ -162,7 +162,7 @@ static void free_page_cgroup(void *addr)
}
#endif
static int __init_refok init_section_page_cgroup(unsigned long pfn)
static int __meminit init_section_page_cgroup(unsigned long pfn)
{
struct page_cgroup *base, *pc;
struct mem_section *section;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册