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
Jeremy Fitzhardinge wrote:
>
> No, you do it the same as i386. You set the segment base to be
> percpu_area-__per_cpu_start, and then just refer to %gs:per_cpu__foo
> directly. You can use rip-relative addressing to make it a smaller
> addressing mode too:
>
> 0: 65 89 05 00 00 00 00 mov %eax,%gs:0(%rip) # 0x7
>

Thinking about this some more, I don't know if it would make sense to
put the x86-64 stack canary at the *end* of the percpu area, and
otherwise use negative offsets. That would make sure they were readily
reachable from %rip-based references from within the kernel text area.

-hpa


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