[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0811051054430.22835@melkki.cs.Helsinki.FI>
Date: Wed, 5 Nov 2008 10:57:11 +0200 (EET)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: Alexey Dobriyan <adobriyan@...il.com>
cc: Christoph Lameter <cl@...ux-foundation.org>, rusty@...tcorp.com.au,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
hannes@...urebad.de
Subject: Re: Broken "cpualloc: the allocator" patch
Hi Alexey,
On Tue, Nov 04, 2008 at 09:38:40AM -0600, Christoph Lameter wrote:
> > Works fine here.
> >
> > Do we have the right tree? I repulled my tree on top of Linuses and
> > things work just fine. Tree is at
> >
> > kernel.org/pub/scm/linux/kernel/git/christoph/work.git cpu_alloc
On Wed, 5 Nov 2008, Alexey Dobriyan wrote:
> Same thing. For reference f622b9e43c8ba1902d4423bef9ae9d89b0254b45 aka
> "cpualloc: the allocator".
>
> It's BUG_ON(!size) at mm/bootmem.c:438. At cpu_alloc_init():
>
> __per_cpu_start = ff...80555000
> __per_cpu_end = ff...8055d3e0
> UNIT_SIZE = 4
> base_percpu_in_units = 8440
> PERCPU_AREA_SIZE = 33760
> nr_units = 0 (bang!)
>
> MODULES are off.
Yup, makes sense. PERCPU_MODULE_RESERVE is set to zero if !CONFIG_MODULES.
Is there a reason we don't do something like this in bootmem allocator?
Hannes?
Pekka
diff --git a/mm/bootmem.c b/mm/bootmem.c
index ac5a891..ee6431f 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -435,7 +435,9 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
unsigned long fallback = 0;
unsigned long min, max, start, sidx, midx, step;
- BUG_ON(!size);
+ if (!size)
+ return NULL;
+
BUG_ON(align & (align - 1));
BUG_ON(limit && goal + size > limit);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists