Re: NUMA aware slab allocator V3

Christoph Lameter
2005-05-14T16:24:47Z

On Sat, 14 May 2005, Andrew Morton wrote:

> Christoph Lameter <clameter@engr.sgi.com> wrote:
> >
> > This patch allows kmalloc_node to be as fast as kmalloc by introducing
> > node specific page lists for partial, free and full slabs.
>
> Oh drat - what happened to all the coding-style fixups? Redone patch
> below. Please merge - slab.c is already not a nice place to visit.

Hmmm.. Strange...

> > +#ifndef CONFIG_NUMA
> > +#if MAX_NUMNODES != 1
> > +#error "Broken Configuration: CONFIG_NUMA not set but MAX_NUMNODES !=1 !!"
> > +#endif
> > +#endif
>
> Well that's doing to make it fail to compile at all on ppc64.

That was intended. Better fail to compile than break on boot.

>
> > {
> > #ifdef CONFIG_SMP
> > check_irq_off();
> > - BUG_ON(spin_trylock(&cachep->spinlock));
> > + BUG_ON(spin_trylock(&list3_data(cachep)->list_lock));
> > +#endif
>
> We can use assert_spin_lcoked() here now btw.

ok.

> I hacked things to compile by setting NDOES_SHIFT to zero and the machine
> boots. I'll leave that hack in place for the while, so -mm is busted on
> ppc64 NUMA. Please sort things out with the ppc64 guys?

Ok. However, this is a general issue with CONFIG_DISCONTIG being on and
CONFIG_NUMA being off. ppc64 will be fine for CONFIG_NUMA but not for
CONFIG_NUMA being off and CONFIG_DISCONTIG being on.

Would you put Dave Hansen's fix in that he posted in this thread?
Seems that we will be evolving finally into a situation in which
all of this will work itself out again.

Another solution would be to s/CONFIG_NUMA/CONFIG_DISCONTIG/ in the slab
allocator until the issues has been worked through.

Here is Dave's patch again:

=====================================================================
I think I found the problem. Could you try the attached patch?

As I said before FLATMEM is really referring to things like the
mem_map[] or max_mapnr.

CONFIG_NEED_MULTIPLE_NODES is what gets turned on for DISCONTIG or for
NUMA. We'll slowly be removing all of the DISCONTIG cases, so
eventually it will merge back to be one with NUMA.

-- Dave

--- clean/include/linux/numa.h.orig 2005-05-13 06:44:56.000000000
-0700
+++ clean/include/linux/numa.h 2005-05-13 06:52:05.000000000 -0700
@@ -3,7 +3,7 @@

#include <linux/config.h>

-#ifndef CONFIG_FLATMEM
+#ifdef CONFIG_NEED_MULTIPLE_NODES
#include <asm/numnodes.h>
#endif

=====================================================================