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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Tuesday, November 20, 2007 - 2:33 pm

On Tue, 20 Nov 2007, Andi Kleen wrote:


The __START_KERNEL_map needs to cover the 2GB that the kernel needs for 
modules and the cpu area 0. The remaining 28GB can be out of range.


My proporsal is -32GB + 2MB. It keeps the arrangement.


32bit sign extension for what? Absolute data references? The addressing 
that I have seen was IP relative. Thus I thought that the kernel could be 
moved lower.


The linker references are to per cpu data already in the 0-MAX_CPU_AREA 
range after this patchset. The problem is the relocation of the 
references when the linker calculates the address of a per cpu variable.


F.e. The pda is placed at absolute address 0

In order to access the pda we have to do either



1. A  CPU_PTR(offsetof pda,<cpu>) which is

offsetof pda (so 0) + cpu_area + cpu << area_shift

The compiler currently folds

offsetof pda + cpu_area

and then addds the shift later.

or

2. We use a CPU_xx op with a segment register.

Then we have no need to add cpu area because it is included in the gs 
offset.


So only case 1 is affected which is not used if cpu ops can be used.
There are still critical path uses of that operation so I would really 
like to avoid the explicit calculation.

If we would go the proposed route then the folding of the address would 
have to be replaced by the linker by an explicit calculation.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[rfc 08/45] cpu alloc: x86 support, clameter, (Mon Nov 19, 6:11 pm)
Re: [rfc 08/45] cpu alloc: x86 support, H. Peter Anvin, (Mon Nov 19, 6:35 pm)
Re: [rfc 08/45] cpu alloc: x86 support, H. Peter Anvin, (Mon Nov 19, 7:18 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Mon Nov 19, 8:16 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Nick Piggin, (Mon Nov 19, 8:37 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Mon Nov 19, 8:50 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Nick Piggin, (Mon Nov 19, 8:59 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Tue Nov 20, 5:01 am)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Tue Nov 20, 5:05 am)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 1:35 pm)
Re: [rfc 08/45] cpu alloc: x86 support, H. Peter Anvin, (Tue Nov 20, 1:43 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Tue Nov 20, 1:51 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 1:58 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Tue Nov 20, 1:59 pm)
Re: [rfc 08/45] cpu alloc: x86 support, H. Peter Anvin, (Tue Nov 20, 2:01 pm)
Re: [rfc 08/45] cpu alloc: x86 support, H. Peter Anvin, (Tue Nov 20, 2:06 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 2:33 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 2:34 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 5:10 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 6:16 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Tue Nov 20, 6:36 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Tue Nov 20, 7:08 pm)
Re: [rfc 08/45] cpu alloc: x86 support, Andi Kleen, (Wed Nov 21, 6:08 am)
Re: [rfc 08/45] cpu alloc: x86 support, Christoph Lameter, (Wed Nov 21, 12:01 pm)
Re: [rfc 08/45] cpu alloc: x86 support, John Richard Moser, (Mon Nov 26, 9:12 pm)