Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1697690
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks |
| Date | 2017-07-27 05:30 +0200 |
| Message-ID | <u7HER-NL-3@gated-at.bofh.it> (permalink) |
| References | <u7qNI-6Vf-3@gated-at.bofh.it> <u7qNI-6Vf-15@gated-at.bofh.it> <u7yLh-3p3-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 26-07-17, 19:42, Rafael J. Wysocki wrote:
> On Wednesday, July 26, 2017 02:52:32 PM Viresh Kumar wrote:
> > + /* Don't allow remote callbacks */
> > + if (smp_processor_id() != data->cpu)
> > + return;
>
> You can do this check against cpu->cpu, however.
>
> > + /* Don't allow remote callbacks */
> > + if (smp_processor_id() != data->cpu)
> > + return;
>
> And same here.
>
> > +
> > if (flags & SCHED_CPUFREQ_IOWAIT) {
> > cpu->iowait_boost = int_tofp(1);
> > } else if (cpu->iowait_boost) {
> > diff --git a/include/linux/sched/cpufreq.h b/include/linux/sched/cpufreq.h
> > index d2be2ccbb372..8256a8f35f22 100644
> > --- a/include/linux/sched/cpufreq.h
> > +++ b/include/linux/sched/cpufreq.h
> > @@ -16,6 +16,7 @@
> > #ifdef CONFIG_CPU_FREQ
> > struct update_util_data {
> > void (*func)(struct update_util_data *data, u64 time, unsigned int flags);
> > + unsigned int cpu;
>
> So it looks like you don't need this.
>
> schedutil doesn't need it as per patch [2/3].
Hmm, so your comments are exactly same as what Peter suggested few
days back.
sugov_get_util() uses it in 2/3, as we need to know the target CPU
anyway.
But I think it would be better to add the cpu variable in sugov_cpu
structure instead as only schedutil needs it. I will do that change
and send V5.
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V4 0/3] sched: cpufreq: Allow remote callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-26 11:30 +0200
[PATCH V4 2/3] cpufreq: schedutil: Process remote callback for shared policies Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-26 11:30 +0200
Re: [Eas-dev] [PATCH V4 2/3] cpufreq: schedutil: Process remote callback for shared policies "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-27 07:50 +0200
[PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-26 11:30 +0200
Re: [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-26 20:00 +0200
Re: [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-27 05:30 +0200
Re: [Eas-dev] [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-27 07:40 +0200
Re: [Eas-dev] [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-27 08:00 +0200
Re: [Eas-dev] [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-27 08:20 +0200
Re: [Eas-dev] [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-27 09:20 +0200
Re: [Eas-dev] [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks Peter Zijlstra <peterz@infradead.org> - 2017-07-27 11:20 +0200
Re: [Eas-dev] [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-28 05:40 +0200
Re: [PATCH V4 1/3] sched: cpufreq: Allow remote cpufreq callbacks Peter Zijlstra <peterz@infradead.org> - 2017-07-27 12:00 +0200
[PATCH V4 3/3] cpufreq: governor: Process remote callback for shared policies Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-26 11:30 +0200
Re: [Eas-dev] [PATCH V4 0/3] sched: cpufreq: Allow remote callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-27 07:20 +0200
Re: [Eas-dev] [PATCH V4 0/3] sched: cpufreq: Allow remote callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-27 07:50 +0200
Re: [Eas-dev] [PATCH V4 0/3] sched: cpufreq: Allow remote callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-27 08:30 +0200
Re: [Eas-dev] [PATCH V4 0/3] sched: cpufreq: Allow remote callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-27 09:20 +0200
Re: [Eas-dev] [PATCH V4 0/3] sched: cpufreq: Allow remote callbacks Juri Lelli <juri.lelli@arm.com> - 2017-07-27 09:30 +0200
Re: [Eas-dev] [PATCH V4 0/3] sched: cpufreq: Allow remote callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-28 05:50 +0200
csiph-web