Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312306
| From | Juri Lelli <juri.lelli@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 18/19] cpufreq: remove transition_lock |
| Date | 2016-01-19 15:50 +0100 |
| Message-ID | <qSFLB-Lg-29@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qQ5jb-cc-5@gated-at.bofh.it> <qQi6J-E5-7@gated-at.bofh.it> <qQng6-4bv-3@gated-at.bofh.it> <qQMHw-59v-11@gated-at.bofh.it> <qSF8S-w0-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 19/01/16 15:00, Peter Zijlstra wrote: > On Wed, Jan 13, 2016 at 10:21:31AM -0800, Michael Turquette wrote: > > RCU is absolutely not a magic bullet or elixir that lets us kick off > > DVFS transitions from the schedule() context. The frequency transitions > > are write-side operations, as we invariably touch struct cpufreq_policy. > > This means that the read-side stuff can live in the schedule() context, > > but write-side needs to be kicked out to a thread. > > Why? If the state is per-cpu and acquired by RCU, updates should be no > problem at all. > > If you need inter-cpu state, then things get to be a little tricky > though, but you can actually nest a raw_spinlock_t in there if you > absolutely have to. > We have at least two problems. First one is that state is per frequency domain (struct cpufreq_policy) and this usually spans more than one cpu. Second one is that we might need to sleep while servicing the frequency transition, both because platform needs to sleep and because some paths of cpufreq core use sleeping locks (yes, that might be changed as well I guess). A solution based on spinlocks only might not be usable on platforms that needs to sleep, also. Another thing that I was thinking of actually is that since struct cpufreq_policy is updated a lot (more or less at every frequency transition), is it actually suitable for RCU? Best, - Juri
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Peter Zijlstra <peterz@infradead.org> - 2016-01-19 15:10 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Juri Lelli <juri.lelli@arm.com> - 2016-01-19 15:50 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Peter Zijlstra <peterz@infradead.org> - 2016-01-19 16:40 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Juri Lelli <juri.lelli@arm.com> - 2016-01-19 17:10 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Peter Zijlstra <peterz@infradead.org> - 2016-01-19 20:20 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Peter Zijlstra <peterz@infradead.org> - 2016-01-19 20:30 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-19 23:00 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Peter Zijlstra <peterz@infradead.org> - 2016-01-20 18:10 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock "Rafael J. Wysocki" <rafael@kernel.org> - 2016-01-20 23:20 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Peter Zijlstra <peterz@infradead.org> - 2016-01-20 23:40 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock "Rafael J. Wysocki" <rafael@kernel.org> - 2016-01-21 00:40 +0100
Re: [RFC PATCH 18/19] cpufreq: remove transition_lock Juri Lelli <juri.lelli@arm.com> - 2016-01-20 14:00 +0100
csiph-web