On Wed, Apr 10, 2013 at 09:44:52AM +0100, Lukasz Majewski wrote: [...] > > Have you also looked at the power clamp driver that have similar > > target ? > > I might be wrong here, but in my opinion the power clamp driver is a bit > different: > > 1. It is dedicated to Intel SoCs, which provide special set of > registers (i.e. MSR_PKG_Cx_RESIDENCY [*]), which forces a processor to > enter certain C state for a given duration. Idle duration is calculated > by per CPU set of high priority kthreads (which also program [*] > registers). > Those registers are used for compensation (ie user asked a given idle ratio but HW stats show a mismatch) and they are not "programmed" they are just read. That code is Intel specific but it can be easily ported to ARM, I did that and most of the code is common with zero dependency on the architecture. > 2. ARM SoCs don't have such infrastructure, so we depend on SW here. Well, it is true that most of the SoCs I am working on do not have a programming interface to monitor C-state residency, granted, this is a problem. If those stats can be retrieved somehow (I did that on our TC2 platform) then power clamp can be used on ARM with minor modifications. Lorenzo -- 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