LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: rusty@rustcorp.com.au, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: Broken "cpualloc: the allocator" patch
Date: Wed, 5 Nov 2008 07:45:35 -0600 (CST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0811050741450.11741@quilx.com> (raw)
In-Reply-To: <20081105084254.GA3429@x200.localdomain>

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.

Oww.. Ok we need to skip ahead to have a hunk from the second stage
to make sure PERCPU_RESERVE_SIZE is always > 0.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>

Index: linux-2.6/include/linux/percpu.h
===================================================================
--- linux-2.6.orig/include/linux/percpu.h	2008-11-05 07:41:22.134646124 -0600
+++ linux-2.6/include/linux/percpu.h	2008-11-05 07:44:28.603155403 -0600
@@ -44,11 +44,7 @@
  extern unsigned int percpu_reserve;
  /* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
  #ifndef PERCPU_AREA_SIZE
-#ifdef CONFIG_MODULES
  #define PERCPU_RESERVE_SIZE	8192
-#else
-#define PERCPU_RESERVE_SIZE	0
-#endif

  #define PERCPU_AREA_SIZE						\
  	(__per_cpu_end - __per_cpu_start + percpu_reserve)

  parent reply	other threads:[~2008-11-05 13:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04  3:42 Alexey Dobriyan
2008-11-04 15:38 ` Christoph Lameter
2008-11-04 15:56   ` Christoph Lameter
2008-11-05  8:42   ` Alexey Dobriyan
2008-11-05  8:57     ` Pekka J Enberg
2008-11-06  2:30       ` Johannes Weiner
2008-11-05 13:45     ` Christoph Lameter [this message]
2008-11-06 16:31       ` Alexey Dobriyan

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=Pine.LNX.4.64.0811050741450.11741@quilx.com \
    --to=cl@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --subject='Re: Broken "cpualloc: the allocator" patch' \
    /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

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).