Message ID | 20150709051024.GJ1805@linux |
---|---|
State | New |
Headers | show |
On 10 July 2015 at 05:35, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: >> - Because governors matched, we skip governor initialization and return >> after calling __cpufreq_governor(CPUFREQ_GOV_LIMITS). > > But this sounds fragile in principle. What's the benefit from skipping the > governor initialization in that case? So this is the case where we have changed some property of the governor, and the governor is already initialised. We need to exit the earlier governor and initialize the new one only when the governor is actually switched. -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b612411655f9..2c22e3902e72 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1132,6 +1132,7 @@ static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu) down_write(&policy->rwsem); policy->cpu = cpu; + policy->governor = NULL; up_write(&policy->rwsem); } -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in