Re: gettimeofday() system call timing curiosity

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri Mar 08 2002 - 13:50:53 EST


Jamie Lokier wrote:

>
> On my laptop, the median of rdtsc+gettimeofday+rdtsc times is 470 cycles
> for most runs of 1000, but is occasionally 453 cycles.
>

What that indicates to me is that 1000 is way too small of a sample.
You're only talking a difference of 17,000 cycles, which could --
especially with cache effects -- easily be the time spent in an
interrupt handler.

        -hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 15 2002 - 22:00:09 EST