Re: Needed faster implementation of do_gettimeofday()

From: Chris Friesen
Date: Tue Feb 22 2005 - 10:48:27 EST

Puneet Kaushik wrote:
Hello Parag and George,

Thanks for immediate reply.
The main problem is I am working on a SMP system. I have written a small
program that just calls the gettimeofday(), one billion times. I have
run it with time utility and it takes almost double time on SMP then a

If the hardware is known in advance, can you use some arch-specific thing (like rdtsc on intel) to get a timestamp that can then be calibrated by calling gettimeofday() at a lower frequency?

There will be issues (may have to use cpu affinity if the two don't run at the same rate, may need to disable any frequency stepping), but it might be possible to work around them.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at