* [PATCH] fix slab allocator for non zero boot cpu
@ 2002-11-05 5:49 Anton Blanchard
2002-11-05 22:24 ` Manfred Spraul
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2002-11-05 5:49 UTC (permalink / raw)
To: manfred; +Cc: linux-kernel
Hi,
The slab allocator doesnt initialise ->array for all cpus. This means
we fail to boot on a machine with boot cpu != 0. I was testing current
2.5 BK.
Luckily Rusty was at hand to explain the ins and outs of initialisers
to me. Manfred, does this look OK to you?
Anton
===== mm/slab.c 1.46 vs edited =====
--- 1.46/mm/slab.c Sat Nov 2 08:34:38 2002
+++ edited/mm/slab.c Tue Nov 5 15:55:55 2002
@@ -437,7 +437,8 @@
/* internal cache of cache description objs */
static kmem_cache_t cache_cache = {
.lists = LIST3_INIT(cache_cache.lists),
- .array = { [0] = &initarray_cache.cache },
+ /* Allow for boot cpu != 0 */
+ .array = { [0 ... NR_CPUS-1] = &initarray_cache.cache },
.batchcount = 1,
.limit = BOOT_CPUCACHE_ENTRIES,
.objsize = sizeof(kmem_cache_t),
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix slab allocator for non zero boot cpu
2002-11-05 5:49 [PATCH] fix slab allocator for non zero boot cpu Anton Blanchard
@ 2002-11-05 22:24 ` Manfred Spraul
0 siblings, 0 replies; 2+ messages in thread
From: Manfred Spraul @ 2002-11-05 22:24 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
Anton Blanchard wrote:
>Hi,
>
>The slab allocator doesnt initialise ->array for all cpus. This means
>we fail to boot on a machine with boot cpu != 0. I was testing current
>2.5 BK.
>
>Luckily Rusty was at hand to explain the ins and outs of initialisers
>to me. Manfred, does this look OK to you?
>
I don't like the patch - it removes the safety net.
initarray_cache is __initdata, and is replaced with actual data after
the kmalloc caches work, but only for the cpu that performed the
bootstrap (end of kmem_cache_sizes_init())
With your patch, the pointer to the head arrays of the other cpus still
point to an __initdata variable. It's even oopsable, if a
CPU_ONLINE_PREPARE is failed by another subsystem.
What about the attached patch?
--
Manfred
[-- Attachment #2: patch-other --]
[-- Type: application/x-java-applet, Size: 648 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-05 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-05 5:49 [PATCH] fix slab allocator for non zero boot cpu Anton Blanchard
2002-11-05 22:24 ` Manfred Spraul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox