Re: gettimeofday() system call timing curiosity

H. Peter Anvin (hpa@zytor.com)
Fri, 08 Mar 2002 10:50:53 -0800


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/