From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.24-rc3-mm2 (bugfix for memory cgroup per-zone-struct allocation.)
Date: Thu, 29 Nov 2007 16:25:33 -0500 [thread overview]
Message-ID: <1196371533.5347.11.camel@localhost> (raw)
In-Reply-To: <20071129142416.f6d1ffcd.kamezawa.hiroyu@jp.fujitsu.com>
On Thu, 2007-11-29 at 14:24 +0900, KAMEZAWA Hiroyuki wrote:
> On Thu, 29 Nov 2007 12:23:29 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > I noticed CONFIG_NUMA + CONFIG_CGROUP_MEM_CONT + CONFIG_SLUB cannot boot because of my patch.
> > (SLAB is ok.)
> > I'll post workaround soon.
> >
> ==
> This is a fix. tested on my ia64/NUMA box both on SLAB/SLUB.
> This patch fixes kmalloc_node() is called against node-without-memory.
>
> It's better to add memory hotplug callback for supporing possible nodes
> (memory hotplug) but here just uses kmalloc().
>
> Should be revisited later.
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> mm/memcontrol.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> Index: linux-2.6.24-rc3-mm2/mm/memcontrol.c
> ===================================================================
> --- linux-2.6.24-rc3-mm2.orig/mm/memcontrol.c
> +++ linux-2.6.24-rc3-mm2/mm/memcontrol.c
> @@ -1117,8 +1117,18 @@ static int alloc_mem_cgroup_per_zone_inf
> struct mem_cgroup_per_node *pn;
> struct mem_cgroup_per_zone *mz;
> int zone;
> -
> - pn = kmalloc_node(sizeof(*pn), GFP_KERNEL, node);
> + /*
> + * This routine is called against possible nodes.
> + * But it's BUG to call kmalloc() against offline node.
> + *
> + * TODO: this routine can waste much memory for nodes which will
> + * never be onlined. It's better to use memory hotplug callback
> + * function.
> + */
> + if (node_state(node, N_HIGH_MEMORY))
> + pn = kmalloc_node(sizeof(*pn), GFP_KERNEL, node);
> + else
> + pn = kmalloc(sizeof(*pn), GFP_KERNEL);
> if (!pn)
> return 1;
>
>
This worked for me. Can boot 24-rc3-mm2 [if I turn off async scsi scan,
that is--not related to mem controller].
Just FYI, on my ia64 platform, with NODES_SHIFT == 8 [RHEL & SLES ship
with 10, I believe], the size of the mem_cgroup structure is ~10KB.
Lee
next prev parent reply other threads:[~2007-11-29 21:25 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 11:41 2.6.24-rc3-mm2 Andrew Morton
2007-11-28 12:40 ` 2.6.24-rc3-mm2 - Build Failure on powerpc timerfd() undeclared Kamalesh Babulal
2007-11-28 13:32 ` Arnd Bergmann
2007-11-28 18:43 ` Andrew Morton
2007-11-28 19:25 ` Davide Libenzi
2007-11-29 0:57 ` Arnd Bergmann
2007-11-28 13:07 ` 2.6.24-rc3-mm2 Build Failure at imacfb framebuffer driver Kamalesh Babulal
2007-11-28 18:51 ` Andrew Morton
2007-11-28 14:16 ` 2.6.24-rc3-mm2 Boaz Harrosh
2007-11-28 14:22 ` [PATCH] 2.6.24-rc3-mm2 build failure pasemi-rng driver Kamalesh Babulal
2007-12-01 19:32 ` Olof Johansson
2007-11-28 14:33 ` [BUG] 2.6.24-rc3-mm2 soft lockup while running tbench Kamalesh Babulal
2007-11-29 21:09 ` Andrew Morton
2007-11-30 5:09 ` Kamalesh Babulal
2007-11-28 19:52 ` 2.6.24-rc3-mm2 (build failure on s390) Christoph Lameter
2007-11-28 20:03 ` Andrew Morton
2007-11-28 19:54 ` 2.6.24-rc3-mm2 (build failure on arm) Christoph Lameter
2007-11-28 20:06 ` Andrew Morton
2007-11-28 20:33 ` Bartlomiej Zolnierkiewicz
2007-11-28 20:01 ` 2.6.24-rc3-mm2: Result: hostbyte=0x01 driverbyte=0x00\nend_request: I/O error Alexey Dobriyan
2007-11-28 21:40 ` Andrew Morton
2007-11-28 22:12 ` Alan Cox
2007-11-28 23:14 ` Matthew Wilcox
2007-11-28 23:36 ` Andrew Morton
2007-11-29 9:33 ` Boaz Harrosh
2007-11-28 22:05 ` 2.6.24-rc3-mm2 - *not* an insta-brick on my Latitude Valdis.Kletnieks
2007-11-28 23:06 ` named + capset = EPERM [Was: 2.6.24-rc3-mm2] Jiri Slaby
2007-11-28 23:31 ` Casey Schaufler
2007-11-28 23:47 ` Serge E. Hallyn
2007-11-29 0:04 ` Serge E. Hallyn
2007-11-29 0:17 ` Serge E. Hallyn
2007-11-29 22:56 ` Jiri Slaby
2007-11-29 3:23 ` 2.6.24-rc3-mm2 KAMEZAWA Hiroyuki
2007-11-29 5:24 ` 2.6.24-rc3-mm2 (bugfix for memory cgroup per-zone-struct allocation.) KAMEZAWA Hiroyuki
2007-11-29 21:25 ` Lee Schermerhorn [this message]
2007-11-30 0:14 ` KAMEZAWA Hiroyuki
2007-11-29 9:00 ` [BUG] 2.6.24-rc3-mm2 kernel bug on nfs & cifs mounted partitions Kamalesh Babulal
2007-11-29 9:09 ` Andrew Morton
2007-11-29 11:57 ` Kamalesh Babulal
2007-11-29 12:10 ` Jan Kara
2007-11-29 14:36 ` Kamalesh Babulal
2007-11-29 14:40 ` Jan Kara
2007-12-02 15:55 ` Kamalesh Babulal
2007-11-29 20:58 ` 2.6.24-rc3-mm2 Torsten Kaiser
2007-11-29 21:07 ` 2.6.24-rc3-mm2 Andrew Morton
2007-11-29 22:30 ` 2.6.24-rc3-mm2 Stefan Richter
2007-12-03 20:27 ` 2.6.24-rc3-mm2 Torsten Kaiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1196371533.5347.11.camel@localhost \
--to=lee.schermerhorn@hp.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).