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

From: H. Peter Anvin
Date: Tue Nov 20 2007 - 15:43:46 EST


Andi Kleen wrote:
On Tuesday 20 November 2007 04:50, Christoph Lameter wrote:
On Tue, 20 Nov 2007, Andi Kleen wrote:
I might be pointing out the obvious, but on x86-64 there is definitely
not 256TB of VM available for this.
Well maybe in the future.

That would either require more than 4 levels or larger pages
in page tables.

One of the issues that I ran into is that I had to place the cpu area
in between to make the offsets link right.

Above -2GB, otherwise you cannot address them


This limitation shouldn't apply to the percpu area, since gs_base can be pointed anywhere in the address space -- in effect we're always indirect.

Obviously the offsets *within* the percpu area has to be in range (±2 GB per cpu for absolute offsets, slightly smaller for %rip-based addressing -- obviously judicious use of an offset for gs_base is essential in the latter case).

Thus you want the percpu areas below -2 GB where they don't interfere with modules or any other precious address space.

-hpa
-
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/