Re: [PATCH] fix slab allocator for non zero boot cpu

From: Manfred Spraul (manfred@colorfullife.com)
Date: Tue Nov 05 2002 - 17:24:15 EST


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


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:39 EST