Xen Linode with Gentoo
Messages for package sys-libs/glibc-2.6.1:
You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS.
This will result in a 50% performance penalty, which is probably not what you want.
so, i need to put that line in the make.conf:
CFLAGS="-O2 -march=i686 -pipe -mno-tls-direct-seg-refs"
and after that, run: emerge -ae world that has:
Total: 109 packages (109 reinstalls), Size of downloads: 11,046 kB
is that really needed? or is just something that will be done on the dom0 side?.
4 Replies
> On 32-bit x86 platforms, Xen uses segmentation to provide protection of the memory used for the hypervisor. This results in some performance issues since wrap-around segments as used by glibc need expensive extra handling. For more information on how Xen uses segmentation, see XenSegments.
It is possible to rebuild glibc so that it only uses segments such that there is no performance penalty. To do this, you need to apply the patch below to the glibc sources and then rebuild glibc with the -mno-tls-direct-seg-refs option.
This patch is not needed for glibc-2.4. It automatically accesses the segments correctly when it detects that it is compiled with the -mno-tls-direct-seg-refs option.
I also run Gentoo on my Linode… wondering, though, if I really want to do this. If anything, my system seems faster on Xen than it did on UML.
I did also change CFLAGS and MAKEOPTS for Xen, since we get Xeon processors, and more of them:
CFLAGS="-march=prescott ..."
MAKEOPTS="-j5"
CFLAGS="-march=prescott -fomit-frame-pointer -O2 -pipe -mno-tls-direct-seg-refs"
MAKEOPTS="-j5"
256 packages were rebuilt, I rebooted, and everything is fine. Anyway, posting this just to say it appears "safe" to do this.