Originally posted by Vorpal
View Post
Announcement
Collapse
No announcement yet.
Linux Developers Are Once Again Trying To Enable Intel FSGSBASE For Better Performance
Collapse
X
-
Originally posted by Vorpal View Post
If I remember correctly (from when I was coding x86 assembly many years ago), the FS and GS registers are used to offset memory access, by user space. However the value stored in them can not be directly accessed by user space, needing a kernel helper for that. At least one of them (I forget which), is normally used by glibc to point to the base address for thread local storage. I also seem to remember that wine might need the other one for some windows emulation trickery in 32-bit mode.
So this patch would simply dispense with the need of going through the kernel to read/write these registers.
Comment
-
Originally posted by Vorpal View Post
If I remember correctly (from when I was coding x86 assembly many years ago), the FS and GS registers are used to offset memory access, by user space. However the value stored in them can not be directly accessed by user space, needing a kernel helper for that. At least one of them (I forget which), is normally used by glibc to point to the base address for thread local storage. I also seem to remember that wine might need the other one for some windows emulation trickery in 32-bit mode.
I need to add, however, that no kernel space helpers are needed to read/write TLS variables. A kernel call is only used when a thread is created - to set up these "offsets".
My assumption therefore is that the performance benefit comes from faster FS/GS manipulation during context switches (i.e. in the kernel).
- Likes 2
Comment
-
Originally posted by sarfarazahmad View PostWhere does Windows stand on this ? We get to know quite a number of details of what's going on in the kernel land courtesy Phoronix among other media. Since Windows is closed-source, I wonder what it is like in that land.
Comment
Comment