Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1358279
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/8] sched/fair: add margin to utilization update |
| Date | 2016-03-15 22:50 +0100 |
| Message-ID | <rd50L-7UJ-39@gated-at.bofh.it> (permalink) |
| References | <rcteN-7Q2-3@gated-at.bofh.it> <rcteO-7Q2-21@gated-at.bofh.it> <rd4xI-7J5-15@gated-at.bofh.it> <rd50L-7UJ-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 15, 2016 at 02:28:48PM -0700, Michael Turquette wrote:
> Quoting Peter Zijlstra (2016-03-15 14:16:14)
> > On Sun, Mar 13, 2016 at 10:22:06PM -0700, Michael Turquette wrote:
> > > @@ -2840,6 +2853,8 @@ static inline void update_load_avg(struct sched_entity *se, int update_tg)
> > >
> > > if (cpu == smp_processor_id() && &rq->cfs == cfs_rq) {
> > > unsigned long max = rq->cpu_capacity_orig;
> > > + unsigned long cap = cfs_rq->avg.util_avg *
> > > + cfs_capacity_margin / max;
> > >
> > > /*
> > > * There are a few boundary cases this might miss but it should
> > > @@ -2852,8 +2867,7 @@ static inline void update_load_avg(struct sched_entity *se, int update_tg)
> > > * thread is a different class (!fair), nor will the utilization
> > > * number include things like RT tasks.
> > > */
> > > - cpufreq_update_util(rq_clock(rq),
> > > - min(cfs_rq->avg.util_avg, max), max);
> > > + cpufreq_update_util(rq_clock(rq), min(cap, max), max);
> > > }
> > > }
> >
> > I really don't see why that is here, and not inside whatever uses
> > cpufreq_update_util().
>
> Because I want schedutil to be dumb and not implement any policy of it's
> own. The idea is for the scheduler to select frequency after all.
>
> I want to avoid a weird hybrid solution where we try to be smart about
> selecting the right capacity/frequency in fair.c (e.g. Steve and Juri's
> patches to fair.c from the sched-freq-v7 series), but then have an
> additional layer of "smarts" massaging those values further in the
> cpufreq governor.
So the problem here is that you add an unconditional division, even if
cpufreq_update_util() then decides to not do anything with it.
Please, these are scheduler paths, do not add (fancy) instructions if
you don't absolutely have to.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] schedutil enhancements Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
[PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:30 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:50 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Steve Muckle <steve.muckle@linaro.org> - 2016-03-16 04:40 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Peter Zijlstra <peterz@infradead.org> - 2016-03-16 09:10 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Juri Lelli <Juri.Lelli@arm.com> - 2016-03-16 11:10 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Steve Muckle <steve.muckle@linaro.org> - 2016-03-16 19:00 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Michael Turquette <mturquette@baylibre.com> - 2016-03-16 23:10 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Juri Lelli <Juri.Lelli@arm.com> - 2016-03-17 10:40 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Steve Muckle <steve.muckle@linaro.org> - 2016-03-17 15:00 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Patrick Bellasi <patrick.bellasi@arm.com> - 2016-03-17 17:00 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-16 13:50 +0100
Re: [PATCH 4/8] cpufreq/schedutil: sysfs capacity margin tunable Michael Turquette <mturquette@baylibre.com> - 2016-03-16 23:10 +0100
[PATCH 1/8] sched/cpufreq: remove cpufreq_trigger_update() Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
Re: [PATCH 1/8] sched/cpufreq: remove cpufreq_trigger_update() Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:20 +0100
Re: [PATCH 1/8] sched/cpufreq: remove cpufreq_trigger_update() Peter Zijlstra <peterz@infradead.org> - 2016-03-15 23:00 +0100
Re: [PATCH 1/8] sched/cpufreq: remove cpufreq_trigger_update() Peter Zijlstra <peterz@infradead.org> - 2016-03-16 09:10 +0100
[PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:30 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Steve Muckle <steve.muckle@linaro.org> - 2016-03-16 05:00 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Peter Zijlstra <peterz@infradead.org> - 2016-03-16 08:50 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Vincent Guittot <vincent.guittot@linaro.org> - 2016-03-16 09:40 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Peter Zijlstra <peterz@infradead.org> - 2016-03-16 10:00 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Vincent Guittot <vincent.guittot@linaro.org> - 2016-03-16 10:20 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-16 13:40 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Peter Zijlstra <peterz@infradead.org> - 2016-03-16 14:20 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-16 14:30 +0100
Re: [PATCH 5/8] sched/cpufreq: pass sched class into cpufreq_update_util Peter Zijlstra <peterz@infradead.org> - 2016-03-16 14:50 +0100
[PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-03-15 20:20 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Michael Turquette <mturquette@baylibre.com> - 2016-03-15 21:50 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-03-16 20:50 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Peter Zijlstra <peterz@infradead.org> - 2016-03-16 21:10 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-16 22:40 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:50 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Peter Zijlstra <peterz@infradead.org> - 2016-03-16 08:50 +0100
Re: [PATCH 8/8] sched: prefer cpufreq_scale_freq_capacity Peter Zijlstra <peterz@infradead.org> - 2016-03-16 13:50 +0100
[PATCH 2/8] sched/fair: add margin to utilization update Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
Re: [PATCH 2/8] sched/fair: add margin to utilization update Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:20 +0100
Re: [PATCH 2/8] sched/fair: add margin to utilization update Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:50 +0100
Re: [PATCH 2/8] sched/fair: add margin to utilization update Steve Muckle <steve.muckle@linaro.org> - 2016-03-16 04:00 +0100
Re: [PATCH 2/8] sched/fair: add margin to utilization update Michael Turquette <mturquette@baylibre.com> - 2016-03-16 23:20 +0100
[PATCH 3/8] sched/cpufreq: new cfs capacity margin helpers Michael Turquette <mturquette@baylibre.com> - 2016-03-14 06:30 +0100
Re: [PATCH 3/8] sched/cpufreq: new cfs capacity margin helpers Peter Zijlstra <peterz@infradead.org> - 2016-03-15 22:20 +0100
Re: [PATCH 0/8] schedutil enhancements "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-16 01:10 +0100
csiph-web