On 20 Jun 2005 at 14:10, 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
Hello!
Isn't that a kind of absurd comparison: rdtsc is one or two instructions, while
gettimeofday is a complete syscall with some many instructions: rdtsc will never
give you the time of day besides of that. Are you voting for replacing
gettimeofday with rdtsc?
> 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
You can either have it accurate, or you can have it fast. Also gettimeofday works
on any UNIX platform, rdtsc does not.
> gettimeofday() for various reasons (cpufreq and SMP issues).
Good point, but you don't get that higher reliability and accuracy for free.
>
> 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.
In which applications (Java excepted maybe) do you really need to call
gettimeofday more than a few thousand times per second? Most likely you are
working around a different issue then.
Regards,
Ulrich
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]