Description
see https://lkml.org/lkml/2015/7/21/759
we probably need to switch to use set_thread_area(2) instead for linux/386.
(do we need to apply this Go 1.4.4 so that Go 1.4 continues to run on
newer kernels with disabled modify_ldt? tentatively labeled Go1.4.4)
According to arch_prctl(2) man page: http://man7.org/linux/man-pages/man2/arch_prctl.2.html
Context switches for 64-bit segment bases are rather expensive. As
an optimization, if a 32-bit TLS base address is used, arch_prctl(2)
may use a real TLS entry as if set_thread_area(2) had been called,
instead of manipulating the segment base register directly.
so we probably could switch to set_thread_area even on linux/amd64,
but I see that glibc still uses arch_prctl(ARCH_SET_FS), so probably
the overhead is not that big a problem.