WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] 46% performance drop with change in glibc

To: <habanero@xxxxxxxxxx>
Subject: RE: [Xen-devel] 46% performance drop with change in glibc
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 7 Nov 2005 21:26:10 -0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Ulrich Drepper <drepper@xxxxxxxxxx>, Robert Read <robert@xxxxxxxxxxxxx>
Delivery-date: Mon, 07 Nov 2005 21:26:19 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXj39SbMmepA4cSQwS2s/XNtQ97UgAAaUGQ
Thread-topic: [Xen-devel] 46% performance drop with change in glibc
> > > The crippled ABI is supported by the code in /lib/i686/nosegneg.  
> > > This code is *automatically* used if the kernel is 
> compiled to match 
> > > the glibc version.  This happens using the
> > >
> > > linux-2.6-xen-vdso-note.patch
> >
> > I believe we have this patch in the xen repo, but I haven't ever 
> > verified whether the right thing happens under FC4.
> 
> I am not seeing this patch in ./patches/linux-2.6.12 
> directory.  Is it somewhere else?

It should be in the main tree. The appended patch was included some time
ago, but I've never tested it to see whether it works since I don't
generally run bleeding edge Fedora.

Is there some piece of the patch missing?

Thanks,
Ian


--- linux-2.6/arch/xen/i386/kernel/vsyscall-note.S
+++ linux-2.6/arch/xen/i386/kernel/vsyscall-note.S
@@ -0,0 +1,32 @@
+/*
+ * This supplies .note.* sections to go into the PT_NOTE inside the
vDSO text.
+ * Here we can supply some information useful to userland.
+ * First we get the vanilla i386 note that supplies the kernel version
info.
+ */
+
+#include "../../../i386/kernel/vsyscall-note.S"
+
+/*
+ * Now we add a special note telling glibc's dynamic linker a fake 
+hardware
+ * flavor that it will use to choose the search path for libraries in 
+the
+ * same way it uses real hardware capabilities like "mmx".
+ * We supply "nosegneg" as the fake capability, to indicate that we
+ * do not like negative offsets in instructions using segment 
+overrides,
+ * since we implement those inefficiently.  This makes it possible to
+ * install libraries optimized to avoid those access patterns in 
+someplace
+ * like /lib/i686/tls/nosegneg.  Note that an /etc/ld.so.conf.d/file
+ * corresponding to the bits here is needed to make ldconfig work
right.
+ * It should contain:
+ *     hwcap 0 nosegneg
+ * to match the mapping of bit to name that we give here.
+ */
+#define NOTE_KERNELCAP_BEGIN(ncaps, mask) \
+       ASM_ELF_NOTE_BEGIN(".note.kernelcap", "a", "GNU", 2) \
+       .long ncaps, mask
+#define NOTE_KERNELCAP(bit, name) \
+       .byte bit; .asciz name
+#define NOTE_KERNELCAP_END ASM_ELF_NOTE_END
+
+NOTE_KERNELCAP_BEGIN(1, 1)
+NOTE_KERNELCAP(1, "nosegneg")  /* Change 1 back to 0 when glibc is 
+fixed! */ NOTE_KERNELCAP_END

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel