All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: john stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>, andrea <andrea@suse.de>,
	ak@muc.de, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	george anzinger <george@mvista.com>, Jeff Dike <jdike@karaya.com>,
	Stephen Hemminger <shemminger@osdl.org>,
	Bill Davidsen <davidsen@tmr.com>
Subject: Re: [PATCH] linux-2.5.44_vsyscall_A1
Date: Tue, 22 Oct 2002 22:03:15 -0400	[thread overview]
Message-ID: <3DB60363.8040104@pobox.com> (raw)
In-Reply-To: 1035336629.954.90.camel@cog

john stultz wrote:
> All,
> 	Here is the next rev of the i386 vsyscall gettimeofday port I sent
> earlier. I've added a fix for the linker trouble in the last one, as
> well as wrapped the whole thing in CONFIG_VSYSCALL. 
> 
> 	This patch implements gettimeofday in a user readable page, allowing
> for calls to gettimeofday to execute completely in userspace, giving a
> significant performance boost. 
>         
> 	Changes to glibc are unnecessary, because users that want to use the
> vsyscall can do so by LD_PRELOADING a library which alias gettimeofday
> before executing their application. This will not affect any other
> application and allows the backward compatibility issue to be ignored.
> I've created an example library (to be attached in a following email)
> and ran a quick performance test w/ and w/o the preloaded library,
> giving the following results:
>         
> Normal gettimeofday
> gettimeofday ( 1403307us / 1000000runs ) = 1.403306us
> vsyscall LD_PRELOAD gettimeofday
> gettimeofday ( 285423us / 1000000runs ) = 0.285423us
> 
> Since this code uses the TSC for calculating time of day, this patch
> will not help systems that suffer from TSC skew (ie: many NUMA systems,
> etc). However, for UP and SMP boxes this is a pretty major win.
> Alternative methods to use the cyclone/HPET registers for NUMA boxes are
> also feasible in the future. 
> 
> Please let me know your thoughts about 2.5 integration. 



In terms of implementation, I think it's way too x86-specific...  some 
of the vsyscall infrastructure can be more generic, making it easier for 
other arches to implement the same functionality.  Also use of TSC isn't 
a terribly good idea...

Overall the idea has existed for a while, and I think it's a good one... 
  gettimeofday(2) is very definitely a performance bottleneck in 
databases, in apache [if nothing's changed in that area...], etc.

	Jeff




  parent reply	other threads:[~2002-10-23  1:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-23  1:30 [PATCH] linux-2.5.44_vsyscall_A1 john stultz
2002-10-23  1:31 ` [EXAMPLE CODE] linux-2.5.43_vsyscall_A1 john stultz
2002-10-23  1:32 ` [RFC] linux-2.5.44_vsyscall-proc_A0 john stultz
2002-10-23  1:51   ` Andrea Arcangeli
2002-10-23  2:03 ` Jeff Garzik [this message]
2002-10-23  4:08   ` [PATCH] linux-2.5.44_vsyscall_A1 H. Peter Anvin
2002-10-23 16:56   ` john stultz

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=3DB60363.8040104@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=ak@muc.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=davidsen@tmr.com \
    --cc=george@mvista.com \
    --cc=jdike@karaya.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@osdl.org \
    /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 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.