Subject: Re: [patch 1/4] network dev read_mostly

From: Eric Dumazet <[email-masked]>
Date: Thu, 15 Mar 2007 08:42:20 +0100

David Miller a écrit :
> From: Eric Dumazet <[email-masked]>
> Date: Thu, 15 Mar 2007 07:28:35 +0100
> 
>> One problem with your patch is that all read_always() of pointers are going to 
>> use 3 bytes more of code, thus raising icache pressure.
>>
>> 48 b8 c3 08 e8 8c af    mov    $0x71af8ce808c3,%rax
>> 71 00 00
>>
>> instead of %rip relative addressing
>>
>> 48 8b 05 99 f3 09 00    mov    652185(%rip),%rax
> 
> Could we obtain %rip relative addressing with the ELF
> relocation approach I mentioned?

I dont think so, because 32 bits relative to %rip is not enough to cover all 
the addresses that a 64bits kernel can use :)

%rip relative addressing works only because all the x86_64 kernel (text+ 
static/bss data) are in the 0xffffffff80000000 - fffffffffff00000  2^31 quadrant

but vmalloc() range for example  is ffffc20000000000 - ffffe1ffffffffff (45 bits)