All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: 46% performance drop with change in glibc
@ 2005-11-07 21:26 Ian Pratt
  2005-11-08 13:05 ` Andrew Theurer
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Pratt @ 2005-11-07 21:26 UTC (permalink / raw)
  To: habanero; +Cc: xen-devel, Ulrich Drepper, Robert Read

> > > 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

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: 46% performance drop with change in glibc
@ 2005-11-08 13:17 Ian Pratt
  2005-11-08 14:57 ` Andrew Theurer
  2005-11-09  2:02 ` Jeremy Katz
  0 siblings, 2 replies; 15+ messages in thread
From: Ian Pratt @ 2005-11-08 13:17 UTC (permalink / raw)
  To: Andrew Theurer; +Cc: xen-devel, Ulrich Drepper, Robert Read

 > >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?
> >
> No, it's all there.  Only part I needed was the change to 
> ld.so.conf.  
> So, anyone with FC4, you might want to make sure you have the 
> entry "hwcap 0 nosegneg".  It looks like the performance 
> regression has disappeared now.  Thanks all for you help.

Perhaps we should have the install script insert a file called
/etc/ld.so.conf.d/xen containing "hwcap 0 nosegneg" ?

Ian

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: 46% performance drop with change in glibc
@ 2005-11-04 16:08 Ian Pratt
  2005-11-07 21:09 ` Andrew Theurer
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Pratt @ 2005-11-04 16:08 UTC (permalink / raw)
  To: Ulrich Drepper, habanero; +Cc: xen-devel, Robert Read

 
> There is no tls subdir since NPTL is the default (and LT is 
> completely gone in FC5).  The code in /lib is the TLS code 
> using the correct ABI.
> 
> 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.

Andrew: please could you check you have the xen glibc rpm installed and
verify that the glibc selection is working using one of our kernels. 

Thanks,
Ian

^ permalink raw reply	[flat|nested] 15+ messages in thread
* 46% performance drop with change in glibc
@ 2005-11-02 19:10 Andrew Theurer
  2005-11-02 19:17 ` Kip Macy
  2005-11-02 20:37 ` Anthony Liguori
  0 siblings, 2 replies; 15+ messages in thread
From: Andrew Theurer @ 2005-11-02 19:10 UTC (permalink / raw)
  To: xen-devel

I have been trying to track down a xen performance regression from Fedora 
core3 to core4 i386 and I think I might have narrowed it down.  First some 
background info:  I ran the SDET benchmark [1] and discovered that we have 
about a 45% regression after upgrading to Fedora core 4.  I noticed 
xenoprofile showed ~20% in error_code on FC4, but only ~3.5% in error_code 
(should we even have 3%?!?) on FC3.  At first I thought the change to gcc-4 
might have something to do with it, so I tried gcc4 on FC3 -no regression.  
I noticed glibc was also different, so I upgraded FC3 from 2.3.3 to 2.3.5 
-bingo.  I am not sure what about glibc is causing this, but here are the 
two profiles:

fc3 with glic-2.3.3:

samples  %        app name                 symbol name
56097    22.8770  cc1                      (no symbols)
22780     9.2900  troff                    (no symbols)
8646      3.5259  xen-unstable-syms        error_code
7822      3.1899  grotty                   (no symbols)
5283      2.1545  libc-2.3.3.so            _int_malloc
4914      2.0040  vmlinux-2.6.12-xen0-up   buffered_rmqueue
4453      1.8160  bash                     (no symbols)
4372      1.7830  xen-unstable-syms        get_page_from_l1e
3492      1.4241  xen-unstable-syms        put_page_from_l1e
3338      1.3613  vmlinux-2.6.12-xen0-up   system_call
3040      1.2397  xen-unstable-syms        hypercall
2801      1.1423  xen-unstable-syms        alloc_page_type
2799      1.1415  vmlinux-2.6.12-xen0-up   zap_pte_range
2798      1.1411  libstdc++.so.6.0.3       (no symbols)
2761      1.1260  libc-2.3.3.so            vfprintf
2637      1.0754  vmlinux-2.6.12-xen0-up   do_no_page
2555      1.0420  libc-2.3.3.so            __i686.get_pc_thunk.bx
2548      1.0391  vmlinux-2.6.12-xen0-up   page_fault

fc3 with glibc-2.3.5:

samples  %        app name                 symbol name
133404   22.7469  xen-unstable-syms        error_code
31411     5.3559  libc-2.3.5.so            malloc
30316     5.1692  troff                    (no symbols)
20632     3.5180  libc-2.3.5.so            vfprintf
16626     2.8349  xen-unstable-syms        gpf_emulate_4gb
10639     1.8141  xen-unstable-syms        do_general_protection
10105     1.7230  grotty                   (no symbols)
9837      1.6773  libc-2.3.5.so            getwchar
8057      1.3738  xen-unstable-syms        decode_register
7347      1.2527  libc-2.3.5.so            iswgraph
7114      1.2130  vmlinux-2.6.12-xen0-up   buffered_rmqueue
6926      1.1810  cc1                      is_attribute_p
6679      1.1388  libc-2.3.5.so            _int_malloc
6350      1.0827  xen-unstable-syms        fixup_seg
5673      0.9673  xen-unstable-syms        get_baselimit
5039      0.8592  bash                     (no symbols)
4957      0.8452  xen-unstable-syms        get_page_from_l1e
4908      0.8369  xen-unstable-syms        put_page_from_l1e
4576      0.7803  ld-2.3.5.so              do_lookup_x
4322      0.7370  xen-unstable-syms        hypercall
3915      0.6676  vmlinux-2.6.12-xen0-up   system_call

I assume something related to gpf_emulate_4gb...
Anyone have an idea why this would cause such a regression?

-Andrew


[1] SDET described here:
http://www.spec.org/osg/sdm91/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-11-09  2:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-07 21:26 46% performance drop with change in glibc Ian Pratt
2005-11-08 13:05 ` Andrew Theurer
  -- strict thread matches above, loose matches on Subject: below --
2005-11-08 13:17 Ian Pratt
2005-11-08 14:57 ` Andrew Theurer
2005-11-08 16:53   ` Ulrich Drepper
2005-11-08 19:30   ` Kurt Garloff
2005-11-09  2:02 ` Jeremy Katz
2005-11-04 16:08 Ian Pratt
2005-11-07 21:09 ` Andrew Theurer
2005-11-02 19:10 Andrew Theurer
2005-11-02 19:17 ` Kip Macy
2005-11-02 19:23   ` Andrew Theurer
2005-11-02 20:14     ` Andrew Theurer
2005-11-02 21:31       ` Ulrich Drepper
2005-11-02 20:37 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.