public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Gregory Maxwell <greg@linuxpower.cx>
Cc: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>,
	Richard Gooch <rgooch@ras.ucalgary.ca>,
	"David S. Miller" <davem@redhat.com>,
	Jeff Garzik <jgarzik@mandrakesoft.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: X15 alpha release: as fast as TUX but in user space (fwd)
Date: Mon, 30 Apr 2001 02:13:45 +0200	[thread overview]
Message-ID: <20010430021345.E923@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.33.0104281752290.10866-100000@localhost.localdomain> <20010428215301.A1052@gruyere.muc.suse.de> <200104282256.f3SMuRW15999@vindaloo.ras.ucalgary.ca> <9cg7t7$gbt$1@cesium.transmeta.com> <3AEBF782.1911EDD2@mandrakesoft.com> <15083.64180.314190.500961@pizda.ninka.net> <20010429153229.L679@nightmaster.csn.tu-chemnitz.de> <200104291848.f3TIm6821037@vindaloo.ras.ucalgary.ca> <20010429221159.U706@nightmaster.csn.tu-chemnitz.de> <20010429161827.B17539@xi.linuxpower.cx>
In-Reply-To: <20010429161827.B17539@xi.linuxpower.cx>; from greg@linuxpower.cx on Sun, Apr 29, 2001 at 04:18:27PM -0400

On Sun, Apr 29, 2001 at 04:18:27PM -0400, Gregory Maxwell wrote:
> having both the code and a comprehensive jump-table might become tough in a

In the x86-64 implementation there's no jump table. The original design
had a jump table but Peter raised the issue that indirect jumps are very
costly and he suggested to jump to a fixed virtual address instead, I
agreed with his suggestion. So this is what I implemented for x86-64
with regard to the userspace vsyscall API (which will be used by glibc):

	enum vsyscall_num {
		__NR_vgettimeofday,
		__NR_vtime,
	};
	
	#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))

the linker can prelink the vsyscall virtual address into the binary as a
weak symbol and the dynamic linker will need to patch it only if
somebody is overriding the weak symbol with a LD_PRELOAD.

Virtual address space is relatively cheap. Currently the 64bit
vgettimeofday bytecode + data is nearly 200 bytes, and the first two
slots are large 512bytes each. So with 1024 bytes we do the whole thing,
and we still have space for further 6 vsyscalls without paying any
additional tlb entry.

(the implementation of the above #define will change shortly but the
VSYSCALL_ADDR() API for glibc will remain the same)

Andrea

  parent reply	other threads:[~2001-04-30  0:14 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-28 15:52 X15 alpha release: as fast as TUX but in user space (fwd) Ingo Molnar
2001-04-28 19:53 ` Andi Kleen
2001-04-28 22:56   ` Richard Gooch
2001-04-29  5:13     ` H. Peter Anvin
2001-04-29 11:14       ` Jeff Garzik
2001-04-29 11:27         ` David S. Miller
2001-04-29 13:32           ` Ingo Oeser
2001-04-29 18:48             ` Richard Gooch
2001-04-29 18:55               ` Gregory Maxwell
2001-04-29 19:02                 ` Richard Gooch
2001-04-29 19:47                   ` Gregory Maxwell
2001-04-29 19:54                     ` Richard Gooch
2001-04-29 20:11               ` Ingo Oeser
2001-04-29 20:18                 ` Gregory Maxwell
2001-04-29 22:20                   ` Richard Gooch
2001-04-30  0:13                   ` Andrea Arcangeli [this message]
2001-04-29 20:45                 ` Arjan van de Ven
2001-04-29 22:18                 ` Richard Gooch
2001-04-30 16:46                 ` Alan Cox
2001-04-29 19:38           ` Jamie Lokier
2001-04-29 23:53             ` Andrea Arcangeli
2001-04-29 16:21         ` dean gaudet
2001-04-29 20:19           ` H. Peter Anvin
2001-04-29 22:29             ` Richard Gooch
2001-04-29 21:16           ` Jim Gettys
2001-04-29 21:40             ` H. Peter Anvin
2001-04-29 21:47               ` Jim Gettys
2001-05-02 18:18             ` Matti Aarnio
2001-05-02 19:34               ` Linus Torvalds
2001-05-02 20:55                 ` Fabio Riccardi
2001-04-30  7:02           ` David S. Miller
2001-04-30  7:29             ` H. Peter Anvin
2001-04-30  7:51               ` David S. Miller
2001-04-30 14:56               ` Jonathan Lundell
2001-04-30  8:42       ` Pavel Machek
2001-05-03  7:13         ` Kai Henningsen
2001-05-03  7:44           ` Keith Owens
2001-05-03 10:37             ` Ingo Oeser
2001-05-03 15:44             ` Gregory Maxwell
2001-05-07 19:04             ` Pavel Machek
2001-05-03  9:37           ` Alan Cox
2001-05-07 19:03             ` vsyscalls [was Re: X15 alpha release: as fast as TUX but in user space (fwd)] Pavel Machek
2001-05-03 12:23         ` X15 alpha release: as fast as TUX but in user space (fwd) Helge Hafting
2001-05-03 19:09           ` Pavel Machek
2001-05-03 19:50             ` agrawal
2001-05-07 19:07               ` vsyscallRe: " Pavel Machek
2001-05-03 20:19             ` Alan Cox
2001-05-03 20:41               ` Gregory Maxwell
2001-05-04  8:06                 ` Pavel Machek
2001-05-04 17:31                   ` dean gaudet
2001-05-04  8:43               ` bert hubert
2001-05-02 10:52     ` Andi Kleen
2001-05-02 10:53       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010430021345.E923@athlon.random \
    --to=andrea@suse.de \
    --cc=davem@redhat.com \
    --cc=greg@linuxpower.cx \
    --cc=hpa@zytor.com \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgooch@ras.ucalgary.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox