Re: [Perfctr-devel] Re: Enabling RDPMC in user space by default

Bernd Schmidt
2005-11-29T23:30:35Z

Andi Kleen wrote:

> To give an bad analogy RDTSC usage in the last years is
> like explicit spinning wait loops for delays in the earlier
> times. They tended to work on some subset of computers,
> but were always bad and caused problems and people eventually learned
> it was better to use operating system services for this.
>
> The kernel will probably not disable RDTSC outright,
> but will make it clear in documentation that it's a bad
> idea to use directly and laugh at everybody who runs
> into problems with it.

I happen to have an old program which uses RDTSC frequently for timing
purposes. That seemed like a good idea at the time, but I guess it
should be updated. The question is, what replacement is there? I don't
want to have to use a syscall every 50 instructions or so. Feel free to
laugh, but suggesting a workable replacement might be more helpful.

Bernd