Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220866
| From | Morten Rasmussen <morten.rasmussen@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig |
| Date | 2015-09-08 16:40 +0200 |
| Message-ID | <q6sdZ-71F-35@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <q69O1-5Bh-5@gated-at.bofh.it> <q6lvQ-5SG-21@gated-at.bofh.it> <q6qca-48n-43@gated-at.bofh.it> <q6qFd-4GE-21@gated-at.bofh.it> <q6rKX-6sO-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Sep 08, 2015 at 04:06:36PM +0200, Vincent Guittot wrote: > On 8 September 2015 at 14:52, Peter Zijlstra <peterz@infradead.org> wrote: > > On Tue, Sep 08, 2015 at 02:26:06PM +0200, Peter Zijlstra wrote: > >> On Tue, Sep 08, 2015 at 09:22:05AM +0200, Vincent Guittot wrote: > >> > No, but > >> > sa->util_avg = (sa->util_sum << SCHED_CAPACITY_SHIFT) / LOAD_AVG_MAX; > >> > will fix the unit issue. > >> > >> Tricky that, LOAD_AVG_MAX very much relies on the unit being 1<<10. > >> > >> And where load_sum already gets a factor 1024 from the weight > >> multiplication, util_sum does not get such a factor, and all the scaling > >> we do on it loose bits. > >> > >> So at the moment we go compute the util_avg value, we need to inflate > >> util_sum with an extra factor 1024 in order to make it work. > >> > >> And seeing that we do the shift up on sa->util_sum without consideration > >> of overflow, would it not make sense to add that factor before the > >> scaling and into the addition? > >> > >> Now, given all that, units are a complete mess here, and I'd not mind > >> something like: > >> > >> #if (SCHED_LOAD_SHIFT - SCHED_LOAD_RESOLUTION) != SCHED_CAPACITY_SHIFT > >> #error "something usefull" > >> #endif > >> > >> somewhere near here. > > > > Something like teh below.. > > > > Another thing to ponder; the downside of scaled_delta_w is that its > > fairly likely delta is small and you loose all bits, whereas the weight > > is likely to be large can could loose a fwe bits without issue. > > > > That is, in fixed point scaling like this, you want to start with the > > biggest numbers, not the smallest, otherwise you loose too much. > > > > The flip side is of course that now you can share a multiplcation. > > > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -682,7 +682,7 @@ void init_entity_runnable_average(struct > > sa->load_avg = scale_load_down(se->load.weight); > > sa->load_sum = sa->load_avg * LOAD_AVG_MAX; > > sa->util_avg = scale_load_down(SCHED_LOAD_SCALE); > > - sa->util_sum = LOAD_AVG_MAX; > > + sa->util_sum = sa->util_avg * LOAD_AVG_MAX; > > /* when this task enqueue'ed, it will contribute to its cfs_rq's load_avg */ > > } > > > > @@ -2515,6 +2515,10 @@ static u32 __compute_runnable_contrib(u6 > > return contrib + runnable_avg_yN_sum[n]; > > } > > > > +#if (SCHED_LOAD_SHIFT - SCHED_LOAD_RESOLUTION) != 10 || SCHED_CAPACITY_SHIFT != 10 > > +#error "load tracking assumes 2^10 as unit" > > +#endif > > so why don't we set SCHED_CAPACITY_SHIFT to SCHED_LOAD_SHIFT ? Don't you mean: #define SCHED_LOAD_SHIFT (SCHED_CAPACITY_SHIFT + SCHED_LOAD_RESOLUTION) ? Or do you want to increase the capacity resolution as well if you increase the load resolution? -- 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 | Next in thread | Find similar | Unroll thread
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Dietmar Eggemann <dietmar.eggemann@arm.com> - 2015-09-07 17:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-07 18:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Dietmar Eggemann <dietmar.eggemann@arm.com> - 2015-09-07 21:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-07 21:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Dietmar Eggemann <dietmar.eggemann@arm.com> - 2015-09-08 14:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-08 09:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-08 14:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-08 15:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-08 16:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-08 16:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-08 16:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-08 16:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-08 17:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-10 00:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-10 13:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-10 13:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-10 14:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-11 10:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-10 19:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-08 18:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-09 11:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-09 11:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-09 13:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-11 19:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-17 12:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-17 12:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-21 11:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-21 19:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-22 09:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Leo Yan <leo.yan@linaro.org> - 2015-09-11 09:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-11 12:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Leo Yan <leo.yan@linaro.org> - 2015-09-11 16:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-10 05:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-10 12:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-08 15:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-08 16:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-08 17:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Dietmar Eggemann <dietmar.eggemann@arm.com> - 2015-09-08 15:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Vincent Guittot <vincent.guittot@linaro.org> - 2015-09-08 16:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Dietmar Eggemann <dietmar.eggemann@arm.com> - 2015-09-08 16:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-10 06:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-10 12:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-11 10:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-11 12:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-11 19:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-12 04:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-14 19:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-14 15:00 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-14 19:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-15 08:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-15 19:20 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-16 04:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig bsegall@google.com - 2015-09-16 19:10 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Yuyang Du <yuyang.du@intel.com> - 2015-09-17 12:30 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Morten Rasmussen <morten.rasmussen@arm.com> - 2015-09-15 10:40 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-16 17:50 +0200
Re: [PATCH 5/6] sched/fair: Get rid of scaling utilization by capacity_orig Peter Zijlstra <peterz@infradead.org> - 2015-09-08 13:50 +0200
[tip:sched/core] sched/fair: Get rid of scaling utilization by capacity_orig tip-bot for Dietmar Eggemann <tipbot@zytor.com> - 2015-09-13 13:10 +0200
csiph-web