diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2009-06-12 03:33:53 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-06-12 04:00:54 -0400 |
commit | ca371c0d7e23d0d0afae65fc83a0e91cf7399573 (patch) | |
tree | 20ca26fbdceefe25d1c362dc23a2152c1aac8b4c /init | |
parent | 8ebf975608aaebd7feb33d77f07ba21a6380e086 (diff) |
memcg: fix page_cgroup fatal error in FLATMEM
Now, SLAB is configured in very early stage and it can be used in
init routine now.
But replacing alloc_bootmem() in FLAT/DISCONTIGMEM's page_cgroup()
initialization breaks the allocation, now.
(Works well in SPARSEMEM case...it supports MEMORY_HOTPLUG and
size of page_cgroup is in reasonable size (< 1 << MAX_ORDER.)
This patch revive FLATMEM+memory cgroup by using alloc_bootmem.
In future,
We stop to support FLATMEM (if no users) or rewrite codes for flatmem
completely.But this will adds more messy codes and overheads.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index 5616661eac01..b3e8f14c568a 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -539,6 +539,11 @@ void __init __weak thread_info_cache_init(void) | |||
539 | */ | 539 | */ |
540 | static void __init mm_init(void) | 540 | static void __init mm_init(void) |
541 | { | 541 | { |
542 | /* | ||
543 | * page_cgroup requires countinous pages as memmap | ||
544 | * and it's bigger than MAX_ORDER unless SPARSEMEM. | ||
545 | */ | ||
546 | page_cgroup_init_flatmem(); | ||
542 | mem_init(); | 547 | mem_init(); |
543 | kmem_cache_init(); | 548 | kmem_cache_init(); |
544 | vmalloc_init(); | 549 | vmalloc_init(); |