Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1258209
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 4/5] cpufreq: governor: Quit work-handlers early if governor is stopped |
| Date | 2015-10-28 15:50 +0100 |
| Message-ID | <qoAd4-3T1-21@gated-at.bofh.it> (permalink) |
| References | <qj2OK-A2-11@gated-at.bofh.it> <qosIx-7ys-5@gated-at.bofh.it> <qouhl-af-23@gated-at.bofh.it> <qoAd3-3T1-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 28-10-15, 16:12, Rafael J. Wysocki wrote: > So this is a changelog matching your patch: > > "gov_queue_work() acquires cpufreq_governor_lock to allow cpufreq_governor_stop() > to drain delayed work items possibly scheduled on CPUs that share the policy with > a CPU being taken offline. > > However, the same goal may be achieved in a more straightforward way if the > policy pointer in the struct cpu_dbs_info matching the policy CPU is reset > upfront by cpufreq_governor_stop() under the timer_mutex belonging to it and > checked against NULL, under the same lock, at the beginning of dbs_timer(). > > In that case every instance of dbs_timer() run for a struct cpu_dbs_info > sharing the policy pointer in question after cpufreq_governor_stop() has started > will notice that that pointer is NULL and bail out immediately without queuing up > any new work items. In turn, gov_cancel_work() called by cpufreq_governor_stop() > before destroying timer_mutex will wait for all of the delayed work items > currently running on the CPUs sharing the policy to drop the mutex, so it may > be destroyed safely. > > Make cpufreq_governor_stop() and dbs_timer() work as described and modify > gov_queue_work() so it does not acquire cpufreq_governor_lock any more." Looks far better, thanks :) -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH V3 4/5] cpufreq: governor: Quit work-handlers early if governor is stopped "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 07:50 +0100
Re: [PATCH V3 4/5] cpufreq: governor: Quit work-handlers early if governor is stopped Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-28 09:30 +0100
Re: [PATCH V3 4/5] cpufreq: governor: Quit work-handlers early if governor is stopped "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 15:50 +0100
Re: [PATCH V3 4/5] cpufreq: governor: Quit work-handlers early if governor is stopped Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-28 15:50 +0100
csiph-web