lkml.org 
[lkml]   [2008]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 00/15] x86_64: Optimize percpu accesses
Christoph Lameter wrote:
>
> Another reason to use a zero based per cpu area is to limit the offset range. Limiting the offset range allows in turn to limit the size of the generated instructions because it is part of the instruction. It also is easier to handle since __per_cpu_start does not figure
> in the calculation of the offsets.
>

No, that makes no difference. There is no short-offset form that
doesn't involve a register (ignoring the 16-bit 67h form on 32 bits.)

For 64 bits, you want to keep the offsets within %rip±2 GB, or you will
have relocation overflows for %rip-based forms; for absolute forms you
have to be in the range 0-4 GB. The %rip-based forms are shorter, and
I'm pretty sure they're the ones we currently generate. Since we base
the kernel at 0xffffffff80000000 (-2 GB) this means a zero-based offset
is actively wrong, and only work by accident (since the first
CONFIG_PHYSICAL_START of that space is unused.)

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-07-09 22:45    [W:0.829 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site