Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467843
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() |
| Date | 2016-08-22 19:30 +0200 |
| Message-ID | <s91cS-Nb-15@gated-at.bofh.it> (permalink) |
| References | <s58cV-2GX-1@gated-at.bofh.it> <s82Xn-4H4-1@gated-at.bofh.it> <s8gGZ-4Rb-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Saturday, August 20, 2016 05:40:49 PM Krzysztof Kozlowski wrote: > On Sat, Aug 20, 2016 at 03:08:01AM +0200, Rafael J. Wysocki wrote: > > On Friday, August 19, 2016 03:26:21 PM Krzysztof Kozlowski wrote: > > > On Fri, Aug 12, 2016 at 2:04 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > > > > > It is useful to know the reason why cpufreq_update_util() has just > > > > been called and that can be passed as flags to cpufreq_update_util() > > > > and to the ->func() callback in struct update_util_data. However, > > > > doing that in addition to passing the util and max arguments they > > > > already take would be clumsy, so avoid it. > > > > > > > > Instead, use the observation that the schedutil governor is part > > > > of the scheduler proper, so it can access scheduler data directly. > > > > This allows the util and max arguments of cpufreq_update_util() > > > > and the ->func() callback in struct update_util_data to be replaced > > > > with a flags one, but schedutil has to be modified to follow. > > > > > > > > Thus make the schedutil governor obtain the CFS utilization > > > > information from the scheduler and use the "RT" and "DL" flags > > > > instead of the special utilization value of ULONG_MAX to track > > > > updates from the RT and DL sched classes. Make it non-modular > > > > too to avoid having to export scheduler variables to modules at > > > > large. > > > > > > > > Next, update all of the other users of cpufreq_update_util() > > > > and the ->func() callback in struct update_util_data accordingly. > > > > > > > > Suggested-by: Peter Zijlstra <peterz@infradead.org> > > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > --- > > > > > > > > v1 -> v2: Do not check cpu_of(rq) against smp_processor_id() in > > > > cfs_rq_util_change(). > > > > > > > > --- > > > > drivers/cpufreq/Kconfig | 5 -- > > > > drivers/cpufreq/cpufreq_governor.c | 2 - > > > > drivers/cpufreq/intel_pstate.c | 2 - > > > > include/linux/sched.h | 12 ++++-- > > > > kernel/sched/cpufreq.c | 2 - > > > > kernel/sched/cpufreq_schedutil.c | 67 ++++++++++++++++++++----------------- > > > > kernel/sched/deadline.c | 4 +- > > > > kernel/sched/fair.c | 10 +---- > > > > kernel/sched/rt.c | 4 +- > > > > kernel/sched/sched.h | 31 +++++------------ > > > > 10 files changed, 66 insertions(+), 73 deletions(-) > > > > > > (...) > > > > > > > --- linux-pm.orig/drivers/cpufreq/Kconfig > > > > +++ linux-pm/drivers/cpufreq/Kconfig > > > > @@ -194,7 +194,7 @@ config CPU_FREQ_GOV_CONSERVATIVE > > > > If in doubt, say N. > > > > > > > > config CPU_FREQ_GOV_SCHEDUTIL > > > > - tristate "'schedutil' cpufreq policy governor" > > > > + bool "'schedutil' cpufreq policy governor" > > > > > > If you change such symbols please remember to update also all the > > > defconfigs. Without the update they start to show errors. > > > > Are there defconfigs that use this particular one? > > Yes, ARM/multi_v7 and exynos were using this as module. Javier sent a > patch for that and should be switched to builtin in upcoming next [1]. > > If you would like to base on top of that, let me know, so I would > prepare a tag. I wouldn't like to rebase, but I can pull that branch depending on how much more material there is on it. Thanks, Rafael
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/2] cpufreq / sched: Rework of cpufreq_update_util() arguments "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-12 02:10 +0200
[PATCH v2 2/2] cpufreq / sched: Pass runqueue pointer to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-12 02:10 +0200
Re: [PATCH v2 2/2] cpufreq / sched: Pass runqueue pointer to cpufreq_update_util() Steve Muckle <steve.muckle@linaro.org> - 2016-08-16 00:20 +0200
[PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-12 02:10 +0200
Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() Steve Muckle <steve.muckle@linaro.org> - 2016-08-16 00:20 +0200
Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() Krzysztof Kozlowski <krzk@kernel.org> - 2016-08-19 15:30 +0200
Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-20 03:10 +0200
Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() Krzysztof Kozlowski <krzk@kernel.org> - 2016-08-20 17:50 +0200
Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-22 19:30 +0200
Re: [PATCH v2 1/2] cpufreq / sched: Pass flags to cpufreq_update_util() Krzysztof Kozlowski <krzk@kernel.org> - 2016-08-24 07:00 +0200
Re: [PATCH v2 0/2] cpufreq / sched: Rework of cpufreq_update_util() arguments Viresh Kumar <viresh.kumar@linaro.org> - 2016-08-16 12:00 +0200
Re: [PATCH v2 0/2] cpufreq / sched: Rework of cpufreq_update_util() arguments Peter Zijlstra <peterz@infradead.org> - 2016-08-16 14:50 +0200
csiph-web