[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtA6aLm==_F9Zmo+4zHQks52nKyo8R7m1=zbYtWLQNeOvQ@mail.gmail.com>
Date: Tue, 2 May 2017 15:38:12 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Morten Rasmussen <Morten.Rasmussen@....com>,
Yuyang Du <yuyang.du@...el.com>, Paul Turner <pjt@...gle.com>,
Ben Segall <bsegall@...gle.com>
Subject: Re: [PATCH v2] sched/fair: update scale invariance of PELT
On 1 May 2017 at 11:00, Peter Zijlstra <peterz@...radead.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
>
Powered by blists - more mailing lists