Re: [PATCH] CPU frequency display in /proc/cpuinfo

From: Erik Mouw
Date: Mon Dec 05 2005 - 08:05:20 EST


On Sun, Dec 04, 2005 at 08:16:11PM -0500, Dave Jones wrote:
> I can't think of a single valid reason why a program would want
> to know the MHz rating of a CPU. Given that it's a) approximate,
> b) subject to change due to power management, c) completely nonsensical
> across CPU vendors, and d) only one of many variables regarding CPU
> performance, any program that bases any decision on the values found
> by parsing that field of /proc/cpuinfo is utterly broken beyond belief.

If you want a userspace governor to change the CPU speed, you need to
export the value to userland. There are several papers showing[1] that
such speed scheduling should be done by power-aware applications which
need to tell the OS what speed they require to run to meet their
processing needs.

I agree that /proc/cpuinfo shouldn't be used (though it is a nice
interface for humans to read about the CPU speed), but the current
sysfs interface should do.


Erik

[1] See for example
http://www.pds.twi.tudelft.nl/~pouwelse/energy_priority_scheduling.ps.gz
http://www.pds.twi.tudelft.nl/~pouwelse/power_aware_video_decoding.ps

--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/