Use GS for TLS!
Previously, the kernel used the regular FS segment for Thread-Local Storage. The problem however, is that userspace code also uses FS for TLS, meaning that the kernel must switch the FS segment between user and kernel, upon every syscall. This is obviously suboptimal for performance (especially with fast syscalls such as futex, nanosleep, or yield).
Marked as WIP, since this requires special support from the linker (binutils-gdb!5 (merged)), and kernel makefiles, which have not yet been merged.
Edited by Jeremy Soller