1. 09 1月, 2009 35 次提交
  2. 07 1月, 2009 1 次提交
  3. 23 10月, 2008 1 次提交
    • K
      memcg: fix page_cgroup allocation · 94b6da5a
      KAMEZAWA Hiroyuki 提交于
      page_cgroup_init() is called from mem_cgroup_init(). But at this
      point, we cannot call alloc_bootmem().
      (and this caused panic at boot.)
      
      This patch moves page_cgroup_init() to init/main.c.
      
      Time table is following:
      ==
        parse_args(). # we can trust mem_cgroup_subsys.disabled bit after this.
        ....
        cgroup_init_early()  # "early" init of cgroup.
        ....
        setup_arch()         # memmap is allocated.
        ...
        page_cgroup_init();
        mem_init();   # we cannot call alloc_bootmem after this.
        ....
        cgroup_init() # mem_cgroup is initialized.
      ==
      
      Before page_cgroup_init(), mem_map must be initialized. So,
      I added page_cgroup_init() to init/main.c directly.
      
      (*) maybe this is not very clean but
          - cgroup_init_early() is too early
          - in cgroup_init(), we have to use vmalloc instead of alloc_bootmem().
          use of vmalloc area in x86-32 is important and we should avoid very large
          vmalloc() in x86-32. So, we want to use alloc_bootmem() and added page_cgroup_init()
          directly to init/main.c
      
      [akpm@linux-foundation.org: remove unneeded/bad mem_cgroup_subsys declaration]
      [akpm@linux-foundation.org: fix build]
      Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Tested-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      94b6da5a
  4. 20 10月, 2008 3 次提交