Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633186 > unrolled thread

Re: [PATCH v2] sched/fair: update scale invariance of PELT

Started byPeter Zijlstra <peterz@infradead.org>
First post2017-04-29 00:20 +0200
Last post2017-05-02 15:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] sched/fair: update scale invariance of PELT Peter Zijlstra <peterz@infradead.org> - 2017-04-29 00:20 +0200
    Re: [PATCH v2] sched/fair: update scale invariance of PELT Peter Zijlstra <peterz@infradead.org> - 2017-05-01 11:10 +0200
      Re: [PATCH v2] sched/fair: update scale invariance of PELT Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-02 15:40 +0200

#1633186 — Re: [PATCH v2] sched/fair: update scale invariance of PELT

FromPeter Zijlstra <peterz@infradead.org>
Date2017-04-29 00:20 +0200
SubjectRe: [PATCH v2] sched/fair: update scale invariance of PELT
Message-ID<tBmp4-5t5-21@gated-at.bofh.it>
On Mon, Apr 10, 2017 at 11:18:29AM +0200, Vincent Guittot wrote:
> +++ b/include/linux/sched.h
> @@ -313,6 +313,7 @@ struct load_weight {
>   */
>  struct sched_avg {
>  	u64				last_update_time;
> +	u64				stolen_idle_time;
>  	u64				load_sum;
>  	u32				util_sum;
>  	u32				period_contrib;

> +		if (sa->util_sum < (LOAD_AVG_MAX * 1000)) {
> +			/*
> +			 * Add the idle time stolen by running at lower compute
> +			 * capacity
> +			 */
> +			delta += sa->stolen_idle_time;
> +		}
> +		sa->stolen_idle_time = 0;


So I was wondering if stolen_idle_time really needs to be a u64. Afaict
we'll be at LOAD_AVG_MAX after LOAD_AVG_MAX_N periods, or LOAD_AVG_MAX_N
* LOAD_AVG_PERIOD time, which ends up being 11040.

After that you'll truncate it anyway.. so there shouldn't be a need to
be much larger than that, no?

[toc] | [next] | [standalone]


#1633584

FromPeter Zijlstra <peterz@infradead.org>
Date2017-05-01 11:10 +0200
Message-ID<tCfvd-7cA-29@gated-at.bofh.it>
In reply to#1633186
On Sat, Apr 29, 2017 at 12:09:24AM +0200, Peter Zijlstra wrote:
> On Mon, Apr 10, 2017 at 11:18:29AM +0200, Vincent Guittot wrote:
> > +++ b/include/linux/sched.h
> > @@ -313,6 +313,7 @@ struct load_weight {
> >   */
> >  struct sched_avg {
> >  	u64				last_update_time;
> > +	u64				stolen_idle_time;
> >  	u64				load_sum;
> >  	u32				util_sum;
> >  	u32				period_contrib;
> 
> > +		if (sa->util_sum < (LOAD_AVG_MAX * 1000)) {
> > +			/*
> > +			 * Add the idle time stolen by running at lower compute
> > +			 * capacity
> > +			 */
> > +			delta += sa->stolen_idle_time;
> > +		}
> > +		sa->stolen_idle_time = 0;
> 
> 
> So I was wondering if stolen_idle_time really needs to be a u64. Afaict
> we'll be at LOAD_AVG_MAX after LOAD_AVG_MAX_N periods, or LOAD_AVG_MAX_N
> * LOAD_AVG_PERIOD time, which ends up being 11040.

* 1024 or course, but still easily fits in u32.

[toc] | [prev] | [next] | [standalone]


#1634415

FromVincent Guittot <vincent.guittot@linaro.org>
Date2017-05-02 15:40 +0200
Message-ID<tCGc2-7i0-15@gated-at.bofh.it>
In reply to#1633584
On 1 May 2017 at 11:00, Peter Zijlstra <peterz@infradead.org> wrote:
> On Sat, Apr 29, 2017 at 12:09:24AM +0200, Peter Zijlstra wrote:
>> On Mon, Apr 10, 2017 at 11:18:29AM +0200, Vincent Guittot wrote:
>> > +++ b/include/linux/sched.h
>> > @@ -313,6 +313,7 @@ struct load_weight {
>> >   */
>> >  struct sched_avg {
>> >     u64                             last_update_time;
>> > +   u64                             stolen_idle_time;
>> >     u64                             load_sum;
>> >     u32                             util_sum;
>> >     u32                             period_contrib;
>>
>> > +           if (sa->util_sum < (LOAD_AVG_MAX * 1000)) {
>> > +                   /*
>> > +                    * Add the idle time stolen by running at lower compute
>> > +                    * capacity
>> > +                    */
>> > +                   delta += sa->stolen_idle_time;
>> > +           }
>> > +           sa->stolen_idle_time = 0;
>>
>>
>> So I was wondering if stolen_idle_time really needs to be a u64. Afaict
>> we'll be at LOAD_AVG_MAX after LOAD_AVG_MAX_N periods, or LOAD_AVG_MAX_N
>> * LOAD_AVG_PERIOD time, which ends up being 11040.
>
> * 1024 or course, but still easily fits in u32.

Correct

>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web