[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47434C46.5080301@zytor.com>
Date: Tue, 20 Nov 2007 13:06:14 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Christoph Lameter <clameter@....com>
CC: Andi Kleen <ak@...e.de>, akpm@...ux-foundation.org, travis@....com,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
linux-kernel@...r.kernel.org
Subject: Re: [rfc 08/45] cpu alloc: x86 support
Christoph Lameter wrote:
> On Tue, 20 Nov 2007, Andi Kleen wrote:
>
>>> 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.
>> The initial reference copy of the percpu area has to be addressed by
>> the linker.
>
> Right that is important for the percpu references that can be folded by
> the linker in order to avoid address calculations.
>
>> Hmm, in theory since it is not actually used by itself I suppose you could
>> move it into positive space.
>
> But the positive space is reserved for a processes memory.
>
But you wouldn't actually *use* this address space. It's just for the
linker to know what address to tag the references with; it gets
relocated by gs_base down into proper kernel space. The linker can
stash the initialized reference copy at any address (LMA) which can be
different from what it will be used at (VMA); that is not an issue.
To use %rip references, though, which are more efficient, you probably
want to use offsets that are just below .text (at -2 GB); presumably
-2 GB-[max size of percpu section]. Again, however, no CPU actually
needs to have its data stashed in that particular location; it's just an
offset.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists