mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Roman Zippel <zippel@linux-m68k.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	George Anzinger <george@mvista.com>,
	Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
Subject: Re: [PATCH 1/6] new timeofday core subsystem for -mm (v.B3)
Date: Mon, 20 Jun 2005 14:53:42 -0700	[thread overview]
Message-ID: <1119304422.9947.90.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <1119291034.16180.9.camel@mindpipe>

On Mon, 2005-06-20 at 14:10 -0400, Lee Revell wrote:
> On Mon, 2005-06-20 at 10:09 -0700, john stultz wrote:
> > As for gettimefoday() syscall performance, I one had some numbers, but
> > I
> > would need to re-create them. I'll see if I can grab a slower box and
> > give you some hard numbers. 
> 
> I ran some tests lately that showed gettimeofday() to be 50x slower than
> rdtsc() on my 600Mhz machine.  Many userspace apps that need a cheap
> high res timer have to use rdtsc now due to the excessive overhead of
> gettimeofday().  It would be more correct if these apps could use
> gettimeofday() for various reasons (cpufreq and SMP issues).

Yea, I would strongly dissuade anyone from using the rdtsc counter for
anything but statistical analysis of code performance. 


> So this patch is addressing a real problem.  I'd be interested to see if
> the performance is good enough to replace rdtsc in these cases.

Yea, honestly I doubt gettimefoday performance will ever be as good as
rdtsc. I mean, that's a single instruction vs syscall overhead +
hardware clock reading + frequency conversion + ntp adjustment. Its just
not a fair comparison. 

On the other hand, I bet reading a random 64 bits out of memory is also
a bit faster then gettimeofday() as well ;)

I don't mean to promise the world. The point of the patch is not to
improve gettimeofday performance, it is to improve the subsystem so it
is correct and manageable, so that we have the flexibility to make
future improvements (such as High-res Timers, Dynamic Ticks/Variable
system timer, and virtualization needs) without impacting performance.

The best payout for gettimeofday performance will probably be in
vsyscall implementations such as what x86-64 already has. My new
infrastructure also supports this (it had to for x86-64), and I've even
got a proof of concept patch for i386 (see the lkml archives for
details).

thanks
-john


  reply	other threads:[~2005-06-20 22:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18  2:56 john stultz
2005-06-18  2:58 ` [PATCH 2/6] new timeofday i386 arch specific changes, part 1 " john stultz
2005-06-18  2:59   ` [PATCH 3/6] new timeofday i386 arch specific changes, part 2 " john stultz
2005-06-18  3:01     ` [PATCH 4/6] new timeofday i386 arch specific changes, part 3 " john stultz
2005-06-18  3:02       ` [PATCH 5/6] new timeofday i386 arch specific changes, part 4 " john stultz
2005-06-18  3:04         ` [PATCH 6/6] new timeofday i386 specific timesources " john stultz
2005-06-18 12:02 ` [PATCH 1/6] new timeofday core subsystem " Roman Zippel
2005-06-20  7:01   ` Ulrich Windl
2005-06-20 10:22     ` Roman Zippel
2005-06-20 10:31       ` Ulrich Windl
2005-06-20 10:54         ` Roman Zippel
2005-06-20 11:04         ` Christoph Hellwig
2005-06-20 17:09   ` john stultz
2005-06-20 18:10     ` Lee Revell
2005-06-20 21:53       ` john stultz [this message]
2005-06-20 23:44         ` Lee Revell
2005-06-21 14:55           ` Chris Friesen
2005-06-21 17:20             ` john stultz
2005-06-21  6:26       ` Ulrich Windl
2005-06-20 22:05     ` Roman Zippel
2005-06-20 23:40       ` Lee Revell
2005-06-20 23:55       ` john stultz
2005-06-21 15:08         ` Roman Zippel
2005-06-22  0:57           ` john stultz
2005-06-22  2:39             ` john stultz
2005-06-22 19:45             ` Roman Zippel
2005-06-23  0:29               ` john stultz
2005-06-23 21:59                 ` Roman Zippel
2005-06-24  0:33                   ` john stultz
2005-06-24 10:58                     ` Roman Zippel
2005-06-21  6:42       ` Ulrich Windl
2005-06-21 15:13         ` Roman Zippel

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=1119304422.9947.90.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    --cc=zippel@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®