Re: Emulate RDTSC

Ingo Molnar (mingo@elte.hu)
Wed, 30 May 2001 07:51:49 +0200 (CEST)


On Tue, 29 May 2001, Jaswinder Singh wrote:

> What is the nice way (in accuracy and performance) to emulate RDTSC in
> Linux for those architectures who dont support RDTSC like in Hitachi
> SH Processors.

if the hardware provides no way to get some accurate estimation of current
time, then there is no way to solve this problem in a generic way.
Typically there are some cycle-accuracy counters in the CPU (ideal
situation), or sometimes there is a counter in some external device (eg.
the i8254 timer counter), but access to these tend to be slow and
typically they are quite coarse as well.

Ingo

-
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/