Messages in this thread | | | Date | Wed, 09 Jul 2008 16:42:16 -0400 | From | "H. Peter Anvin" <> | Subject | Re: [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
| |