Re: Enabling RDPMC in user space by default

Andi Kleen
2005-11-30T03:38:14Z

> > Any comments on this?
>
> I think that this should be best left to a profiling tool to configure and
> not a general kernel facility. I also have very little faith in processor
> vendors not doing to performance counters what was done to the TSC.

The use case would be small code snippets to benchmark some code
or instructions. That normally can't be done with a external
tool and exec'ing something would be quite awkward. Also
I would like to allow this for normal users.

The performance counters definitely share some properties with TSC already -
they definitely won't be synced (because they don't tick in C states etc.)
so if you change CPUs they won't be monotone.

But I doubt we'll ever see them running at a different frequency than
the current P state, which is the big problem RDTSC has now and that's
why I'm looking for a replacement. That it's faster on P4 is just
a bonus.

However it looks like everybody except me hates the idea :/ Or perhaps
a lot of the opposition was just against the reasonable position
that profiling should not disturb the NMI watchdogs. I guess not
everybody values debuggable kernel dumps.

-Andi