[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081106023059.GA3555@cmpxchg.org>
Date: Thu, 6 Nov 2008 03:30:59 +0100
From: Johannes Weiner <hannes@...xchg.org>
To: Pekka J Enberg <penberg@...helsinki.fi>
Cc: Alexey Dobriyan <adobriyan@...il.com>,
Christoph Lameter <cl@...ux-foundation.org>,
rusty@...tcorp.com.au, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org
Subject: Re: Broken "cpualloc: the allocator" patch
On Wed, Nov 05, 2008 at 10:57:11AM +0200, Pekka J Enberg wrote:
> 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);
That comes from the original code, I have no strong opinion on it.
Christoph already fixed it up by making PERCPU_MODULE_RESERVE always
!0 and it looks like all other callsites are happy with the current
behaviour.
Hannes
--
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