xen-devel
[Xen-devel] [patch 17/44] Add nosegneg capability to the vsyscall page n
To: |
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> |
Subject: |
[Xen-devel] [patch 17/44] Add nosegneg capability to the vsyscall page notes |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx> |
Date: |
Mon, 16 Jul 2007 16:15:53 -0700 |
Cc: |
Zachary Amsden <zach@xxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Ulrich Drepper <drepper@xxxxxxxxxx>, Roland McGrath <roland@xxxxxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> |
Delivery-date: |
Mon, 16 Jul 2007 16:58:15 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
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> |
References: |
<20070716231536.937393000@xxxxxxxxxxxxx>> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
quilt/0.46-1 |
Add the "nosegneg" fake capabilty to the vsyscall page notes. This is
used by the runtime linker to select a glibc version which then
disables negative-offset accesses to the thread-local segment via
%gs. These accesses require emulation in Xen (because segments are
truncated to protect the hypervisor address space) and avoiding them
provides a measurable performance boost.
Signed-off-by: Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Acked-by: Zachary Amsden <zach@xxxxxxxxxx>
Cc: Roland McGrath <roland@xxxxxxxxxx>
Cc: Ulrich Drepper <drepper@xxxxxxxxxx>
---
arch/i386/kernel/vsyscall-note.S | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
===================================================================
--- a/arch/i386/kernel/vsyscall-note.S
+++ b/arch/i386/kernel/vsyscall-note.S
@@ -12,3 +12,31 @@ ELFNOTE_START(Linux, 0, "a")
ELFNOTE_START(Linux, 0, "a")
.long LINUX_VERSION_CODE
ELFNOTE_END
+
+#ifdef CONFIG_XEN
+
+/*
+ * 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 1 nosegneg
+ * to match the mapping of bit to name that we give here.
+ */
+
+/* Bit used for the pseudo-hwcap for non-negative segments. We use
+ bit 1 to avoid bugs in some versions of glibc when bit 0 is
+ used; the choice is otherwise arbitrary. */
+#define VDSO_NOTE_NONEGSEG_BIT 1
+
+ELFNOTE_START(GNU, 2, "a")
+ .long 1, 1<<VDSO_NOTE_NONEGSEG_BIT /* ncaps, mask */
+ .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
+ELFNOTE_END
+#endif
--
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [patch 02/44] add argv_split(), (continued)
- [Xen-devel] [patch 02/44] add argv_split(), Jeremy Fitzhardinge
- [Xen-devel] [patch 03/44] usermodehelper: split setup from execution, Jeremy Fitzhardinge
- [Xen-devel] [patch 10/44] paravirt: unstatic leave_mm, Jeremy Fitzhardinge
- [Xen-devel] [patch 12/44] paravirt: make siblingmap functions visible, Jeremy Fitzhardinge
- [Xen-devel] [patch 08/44] paravirt: add a hook for once the allocator is ready, Jeremy Fitzhardinge
- [Xen-devel] [patch 05/44] usermodehelper: Tidy up waiting, Jeremy Fitzhardinge
- [Xen-devel] [patch 06/44] use elfnote.h to generate vsyscall notes., Jeremy Fitzhardinge
- [Xen-devel] [patch 13/44] paravirt: export __supported_pte_mask, Jeremy Fitzhardinge
- [Xen-devel] [patch 17/44] Add nosegneg capability to the vsyscall page notes,
Jeremy Fitzhardinge <=
- [Xen-devel] [patch 14/44] Allocate and free vmalloc areas, Jeremy Fitzhardinge
- [Xen-devel] [patch 23/44] xen: configuration, Jeremy Fitzhardinge
- [Xen-devel] [patch 26/44] xen: ignore RW mapping of RO pages in pagetable_init, Jeremy Fitzhardinge
- [Xen-devel] [patch 22/44] xen: time implementation, Jeremy Fitzhardinge
- [Xen-devel] [patch 33/44] xen: use the hvc console infrastructure for Xen console, Jeremy Fitzhardinge
- [Xen-devel] [patch 24/44] xen: add pinned page flag, Jeremy Fitzhardinge
- [Xen-devel] [patch 25/44] xen: Complete pagetable pinning, Jeremy Fitzhardinge
- [Xen-devel] [patch 21/44] xen: event channels, Jeremy Fitzhardinge
|
|
|