Re: [PATCH] you have how many nodes??
From: Andrew Morton
Date: Wed Sep 10 2003 - 17:37:11 EST
jbarnes@xxxxxxx (Jesse Barnes) wrote:
>
> Needed this for booting on a 128 node system.
>
> -#define ZONE_SHIFT (BITS_PER_LONG - 8)
> +#define ZONE_SHIFT (BITS_PER_LONG - 10)
eeek, ia32 just lost another two page flags.
This stuff needs to be controlled by per-arch and per-subarch header files.
Instead of going backwards like this we'd like to actually free up _more_
bits in page->flags. The worst (and controlling) case is on 32-bit NUMA:
eight nodes, three zones per node. That's five bits, leaving us 27 page
flags.
So we'd need
include/asm-foo/zonestuff.h:
#define ARCH_MAX_NODES_SHIFT 3 /* Up to 8 nodes */
#define ARCH_MAX_ZONES_SHIFT 2 /* Up to 4 zones per node */
and all the mm.h/mmzone.h constants use those two.
I think. We could just say "dang numaq needs five bits", so:
#if BITS_PER_LONG == 32
#define ZONE_SHIFT 5
#else
#define ZONE_SHIFT 10
#endif
Bit sleazy, but I think that would suffice.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/