[lkml]   [2007]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [rfc 37/45] x86_64: Support for fast per cpu operations
Christoph Lameter wrote:
> On Mon, 19 Nov 2007, H. Peter Anvin wrote:
>> There was, at some point, discussion about using the gcc TLS mechanism, which
>> should permit even better code to be generated. Unfortunately, it would
> How would that be possible? Oh. You mean the discussion where I mentioned
> using the thread attribute?
>> require gcc to be able to reference %gs instead of %fs (and vice versa for
>> i386), which I don't think is available in anything except maybe the most
>> cutting-edge version of gcc.
> Right. That is why we do it in ASM here.
>> However, if we're doing a masssive revampt it would be good to get an idea of
>> how to migrate to that model eventually, or why it doesn't make sense at all.
> If you can tell me what the difference would be then we can discuss it.
> AFAICT there is no difference. Both use a segment register.

As far as I can tell from a *very* brief look at your code (which means
I might have misread it), these are the differences:

- gcc uses %fs:0 to contain a pointer to itself.
- gcc uses absolute offsets from the thread pointer, rather than adding
%rip. The %rip-based form is actually more efficient, but it does
affect the usable range off the base pointer.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-11-20 03:23    [W:0.095 / U:8.640 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site