On Thu, Apr 29, 2010 at 01:46:45PM +0200, Thomas Renninger wrote: > From: Borislav Petkov <borislav.petkov@xxxxxxx> > > Add cpuid() helpers blatantly stolen from the kernel sources and > use that for checking for aperf/mperf support instead of accessing > "/dev/cpu/%d/cpuid" which requires the module to be enabled on the > target system. > Signed-off-by: Borislav Petkov <borislav.petkov@xxxxxxx> > Signed-off-by: Thomas Renninger <trenn@xxxxxxx> > CC: cpufreq@xxxxxxxxxxxxxxx > CC: linux@xxxxxxxxxxxxxxxxxxxx Hm, the only thing I do not like about this patch is the following: brodo@comet$ sudo ./cpufreq-aperf CPU Average freq(KHz) Time in C0 Time in Cx C0 percentage 000 1220610 00 sec 282 ms 00 sec 717 ms 28 001 1160580 00 sec 316 ms 00 sec 683 ms 31 brodo@comet$ ./cpufreq-aperf CPU Average freq(KHz) Time in C0 Time in Cx C0 percentage [offline] [offline] We should abort if we can't read the MSR, not loop with reporting "all cores are offline". Also, should we still print the CPU no for offline CPUs? Best, Dominik -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html