Re: Enabling RDPMC in user space by default

Andi Kleen
2005-11-29T16:17:11Z

> PMC0 stops being a cycle counter as soon as any real driver
> (not the NMI watchdog) takes over the hardware, such as oprofile,
> perfmon2, or perfctr. So user-space cannot rely on the semantics

They're wrong then. oprofile shouldn't disable the NMI
watchdog. If it does it's broken and needs to be fixed.

> Disabling user-space RDTSC (setting CR4.TSD) seems evil and pointless.
> At least some users of it (the perfctr library and I hope eventually
> also perfmon2) do use it in an SMP-safe manner (through special
> user/kernel protocols).

How do you handle P state changes? I don't think it can be safely
used in user space.

-Andi