Re: [rfc 08/45] cpu alloc: x86 support

Andi Kleen
2007-11-20T03:20:54Z

> 4k cpu configurations with 1k nodes:
>
> 4096 * 16MB = 64TB of virtual space.
>
> Maximum theoretical configuration 16384 processors 1k nodes:
>
> 16384 * 16MB = 256TB of virtual space.
>
> Both fit within the established limits established.

I might be pointing out the obvious, but on x86-64 there is definitely not
256TB of VM available for this.

Not even 64TB, as long as you want to have any
other mappings in kernel (total kernel memory 128TB, but it is split in
half for the direct mapping)

BTW if you allocate any VM you should also update
Documentation/x86_64/mm.txt which describes the mapping

> Index: linux-2.6/include/asm-x86/pgtable_64.h
> ===================================================================
> --- linux-2.6.orig/include/asm-x86/pgtable_64.h 2007-11-19
> 15:45:07.638390147 -0800 +++
> linux-2.6/include/asm-x86/pgtable_64.h 2007-11-19 15:55:53.165640248 -0800
> @@ -138,6 +138,7 @@ static inline pte_t ptep_get_and_clear_f
> #define VMALLOC_START _AC(0xffffc20000000000, UL)
> #define VMALLOC_END _AC(0xffffe1ffffffffff, UL)
> #define VMEMMAP_START _AC(0xffffe20000000000, UL)
> +#define CPU_AREA_BASE _AC(0xffffffff84000000, UL)

That's slightly less than 1GB before you bump into the maximum.
But you'll bump into the module mapping even before that.

For 16MB/CPU and the full 1GB that's ~123 CPUs if my calculations are correct.
Even for a not Altix that's quite tight.

I suppose 16MB/CPU are too large.

-Andi