linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux-foundation.org>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@vger.kernel.org, jeremy@goop.org, ebiederm@xmission.com,
	travis@sgi.com, herbert@gondor.apana.org.au, xemul@openvz.org
Subject: Re: [patch 3/4] cpu alloc: The allocator
Date: Fri, 19 Sep 2008 08:11:17 -0500	[thread overview]
Message-ID: <48D3A4F5.9010804@linux-foundation.org> (raw)
In-Reply-To: <84144f020809190058j425eb995y7f441da18079dc8d@mail.gmail.com>

Pekka Enberg wrote:
> 
>> + *
>> + * (C) 2008 SGI, Christoph Lameter <clameter@sgi.com>
> 
> You probably want to drop that defunct email address.

Ok.


> I found the first sentence a bit misleading. You can be easily fooled
> into thinking "simultaneously" means there's no global locking (well,
> I was).

Reformulated the sentence.


>> +       BUG_ON(index >= nr_units ||
>> +               !test_bit(index, cpu_alloc_map) ||
>> +               !test_bit(index + units - 1, cpu_alloc_map));
> 
> Why not turn this into three separate BUG_ON() calls? It's much easier
> to figure out the offending expression like that. Also, maybe we want
> these to be WARN_ON() calls (and early return) to avoid early boot
> panic?

Ok these are basically for two error conditions:

1. Size to large

2. address out of bounds

So I made them into two bugs.

I thought we could handle early boot panics with early_printk?


>> Index: linux-2.6/arch/x86/kernel/setup_percpu.c
>> ===================================================================
>> --- linux-2.6.orig/arch/x86/kernel/setup_percpu.c       2008-09-16 19:04:30.000000000 -0700
>> +++ linux-2.6/arch/x86/kernel/setup_percpu.c    2008-09-16 19:04:48.000000000 -0700
>> @@ -144,6 +144,7 @@ void __init setup_per_cpu_areas(void)
>>        char *ptr;
>>        int cpu;
>>
>> +       cpu_alloc_init();
>>        /* Setup cpu_pda map */
>>        setup_cpu_pda_map();
> 
> We need to do sparc, powerpc, and ia64 too, right?

Correct.

  reply	other threads:[~2008-09-19 13:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 23:36 [patch 0/4] Cpu alloc V4: Replace percpu allocator in modules.c Christoph Lameter
2008-09-18 23:36 ` [patch 1/4] Make the per cpu reserve configurable Christoph Lameter
2008-09-19  7:12   ` Pekka Enberg
2008-09-19 12:56     ` Christoph Lameter
2008-09-18 23:36 ` [patch 2/4] percpu: Rename variables PERCPU_ENOUGH_ROOM -> PERCPU_AREA_SIZE Christoph Lameter
2008-09-18 23:36 ` [patch 3/4] cpu alloc: The allocator Christoph Lameter
2008-09-19  7:58   ` Pekka Enberg
2008-09-19 13:11     ` Christoph Lameter [this message]
2008-09-19 14:12       ` Pekka Enberg
2008-09-19 14:27         ` Christoph Lameter
2008-09-19 14:35           ` Pekka Enberg
2008-09-18 23:36 ` [patch 4/4] cpu alloc: Use cpu allocator instead of the builtin modules per cpu allocator Christoph Lameter
2008-09-19  7:39   ` Eric Dumazet
2008-09-19 12:59     ` Christoph Lameter
2008-09-19 13:23       ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2008-09-19 14:58 [patch 0/4] Cpu alloc V5: Replace percpu allocator in modules.c Christoph Lameter
2008-09-19 14:59 ` [patch 3/4] cpu alloc: The allocator Christoph Lameter
2008-09-19 15:23   ` KOSAKI Motohiro
2008-09-19 16:27   ` Eric Dumazet
2008-09-19 16:49     ` Christoph Lameter
2008-09-19 17:00       ` Christoph Lameter
2008-09-19 20:32   ` Christoph Lameter
2008-09-29 19:35 [patch 0/4] Cpu alloc V6: Replace percpu allocator in modules.c Christoph Lameter
2008-09-29 19:35 ` [patch 3/4] cpu alloc: The allocator Christoph Lameter
2008-09-30  6:35   ` Pekka Enberg
2008-09-30 11:38     ` Christoph Lameter
2008-09-30 11:48       ` Pekka Enberg
2008-09-30 12:12         ` Christoph Lameter
2008-10-03  7:33   ` Andrew Morton
2008-10-03  7:43     ` Pekka Enberg
2008-10-03  8:20       ` Andrew Morton
2008-10-03 14:15         ` Christoph Lameter
2008-10-03 12:48     ` Christoph Lameter
2008-10-05 21:10       ` Rusty Russell
2008-10-07 13:27         ` Christoph Lameter

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=48D3A4F5.9010804@linux-foundation.org \
    --to=cl@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=travis@sgi.com \
    --cc=xemul@openvz.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).