[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48D3A4F5.9010804@linux-foundation.org>
Date: Fri, 19 Sep 2008 08:11:17 -0500
From: Christoph Lameter <cl@...ux-foundation.org>
To: Pekka Enberg <penberg@...helsinki.fi>
CC: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...r.kernel.org, jeremy@...p.org, ebiederm@...ssion.com,
travis@....com, herbert@...dor.apana.org.au, xemul@...nvz.org
Subject: Re: [patch 3/4] cpu alloc: The allocator
Pekka Enberg wrote:
>
>> + *
>> + * (C) 2008 SGI, Christoph Lameter <clameter@....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.
--
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