Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356326
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() |
| Date | 2016-03-12 03:10 +0100 |
| Message-ID | <rbHa9-7jY-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> cpufreq_resume() attempts to resync the current frequency with policy->cur for the first online CPU, but first it does that after restarting governors for all active policies (which means that this is racy with respect to whatever the governors do) and second it already is too late for that when cpufreq_resume() is called (that happens after invoking ->resume callbacks for all devices in the system). Also it doesn't make sense to do that for one CPU only in any case, because the other CPUs in the system need not share the policy with it and their policy->cur may be out of sync as well in principle. For the above reasons, drop the part in question from cpufreq_resume(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- drivers/cpufreq/cpufreq.c | 11 ----------- 1 file changed, 11 deletions(-) Index: linux-pm/drivers/cpufreq/cpufreq.c =================================================================== --- linux-pm.orig/drivers/cpufreq/cpufreq.c +++ linux-pm/drivers/cpufreq/cpufreq.c @@ -1593,17 +1593,6 @@ void cpufreq_resume(void) __func__, policy); } } - - /* - * schedule call cpufreq_update_policy() for first-online CPU, as that - * wouldn't be hotplugged-out on suspend. It will verify that the - * current freq is in sync with what we believe it to be. - */ - policy = cpufreq_cpu_get_raw(cpumask_first(cpu_online_mask)); - if (WARN_ON(!policy)) - return; - - schedule_work(&policy->update); } /**
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-12 03:10 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-15 07:20 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-15 13:20 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-16 02:00 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-16 06:00 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-16 13:30 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-17 07:50 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-16 05:50 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-16 14:20 +0100
Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-17 07:40 +0100
csiph-web