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
Eric W. Biederman wrote:
> Jeremy Fitzhardinge <jeremy@goop.org> writes:
>
>
>>> Which means that my idea of using the technique we use on x86_32 will not
>>>
>> work.
>>
>> No, the compiler memory model we use guarantees that everything will be within
>> 2G of each other. The linker will spew loudly if that's not the case.
>>
>
> The per cpu area is at least theoretically dynamically allocated. And we
> really want to put it in cpu local memory. Which means on any reasonable
> NUMA machine the per cpu areas should be all over the box.
>

Yes, but that doesn't matter in the slightest. The effective address
will be within 2G of the base; the base can be anywhere.

> So there is no guarantee that with an arbitrary 64bit address in %gs of anything.
>
> Grr. Except you are correct. We have to guarantee that the offsets we have
> chosen at compile time still work. And we know all of the compile time offsets
> will be in the -2G range. So they are all 32bit numbers. Negative 32bit
> numbers to be sure. That trivially leaves us with everything working except
> the nasty hard coded decimal 40.
>

Right.

J


\
 
 \ /
  Last update: 2008-07-10 02:27    [W:0.184 / U:1.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site