[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aeb800c0-f23a-b9c3-6014-f5248f84adbd@arm.com>
Date: Thu, 31 Oct 2019 17:44:44 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Qais Yousef <qais.yousef@....com>,
Peter Zijlstra <peterz@...radead.org>,
Thara Gopinath <thara.gopinath@...aro.org>,
Ingo Molnar <mingo@...hat.com>,
Ionela Voinescu <ionela.voinescu@....com>,
Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Quentin Perret <qperret@...gle.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Amit Kachhap <amit.kachhap@...il.com>,
Javi Merino <javi.merino@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Subject: Re: [Patch v4 4/6] sched/fair: update cpu_capcity to reflect thermal
pressure
On 31.10.19 17:31, Vincent Guittot wrote:
> On Thu, 31 Oct 2019 at 17:17, Dietmar Eggemann <dietmar.eggemann@....com> wrote:
>>
>> On 31.10.19 16:48, Vincent Guittot wrote:
>>> On Thu, 31 Oct 2019 at 16:38, Dietmar Eggemann <dietmar.eggemann@....com> wrote:
>>>>
>>>> On 31.10.19 11:53, Qais Yousef wrote:
>>>>> On 10/28/19 16:30, Peter Zijlstra wrote:
>>>>>> On Wed, Oct 23, 2019 at 01:28:40PM +0100, Qais Yousef wrote:
>>>>>>> On 10/22/19 16:34, Thara Gopinath wrote:
[...]
>>>> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
>>>> index 38210691c615..d3035457483f 100644
>>>> --- a/kernel/sched/pelt.c
>>>> +++ b/kernel/sched/pelt.c
>>>> @@ -357,9 +357,9 @@ int update_thermal_load_avg(u64 now, struct rq *rq,
>>>> u64 capacity)
>>>> {
>>>> if (___update_load_sum(now, &rq->avg_thermal,
>>>> capacity,
>>>> - capacity,
>>>> - capacity)) {
>>>> - ___update_load_avg(&rq->avg_thermal, 1, 1);
>>>> + 0,
>>>> + 0)) {
>>>> + ___update_load_avg(&rq->avg_thermal, 1, 0);
>>>> return 1;
>>>> }
>>
>> So we could call it this way since we don't care about runnable_load or
>> util?
>
> one way or the other is quite similar but the current solution is
> aligned with other irq, rt, dl signals which duplicates the same state
> in each fields
I see. But there is a subtle difference. For irq, rt, dl, we have to
also set load (even we only use util) because of:
___update_load_sum() {
...
if (!load)
runnable = running = 0;
...
}
which is there for se's only.
I like self-explanatory code but I agree in this case it's not obvious.
Powered by blists - more mailing lists