From: Thara Gopinath <thara.gopinath@linaro.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Ionela Voinescu <ionela.voinescu@arm.com>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Amit Kachhap <amit.kachhap@gmail.com>,
Javi Merino <javi.merino@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [Patch v3 1/7] sched/pelt.c: Add support to track thermal pressure
Date: Wed, 16 Oct 2019 17:15:56 -0400 [thread overview]
Message-ID: <5DA7888C.3050406@linaro.org> (raw)
In-Reply-To: <CAKfTPtCCjETcDNdP1xuRJ0w3futRV+J+hqkXgYyPQXzOqnaoVg@mail.gmail.com>
Hi Vincent,
Thanks for the review.
On 10/14/2019 09:55 AM, Vincent Guittot wrote:
> Hi Thara,
>
> On Mon, 14 Oct 2019 at 02:58, Thara Gopinath <thara.gopinath@linaro.org> wrote:
>>
>> Extrapolating on the exisitng framework to track rt/dl utilization using
>
> s/exisitng/existing/
>
>> pelt signals, add a similar mechanism to track thermal pressue. The
>
> s/pessure/pressure/
Will fix all the typo.
>
>> difference here from rt/dl utilization tracking is that, instead of
>> tracking time spent by a cpu running a rt/dl task through util_avg,
>> the average thermal pressure is tracked through load_avg.
>
> It would be good to mention why you use load_avg field instead of
> util_avg field: because the signal is weighted with the capped
> capacity and is not binary
> And also explained a bit what capacity refer to
>
>> In order to track average thermal pressure, a new sched_avg variable
>> avg_thermal is introduced. Function update_thermal_avg can be called
>> to do the periodic bookeeping (accumulate, decay and average)
>> of the thermal pressure.
>>
>> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
>> ---
>> kernel/sched/pelt.c | 13 +++++++++++++
>> kernel/sched/pelt.h | 7 +++++++
>> kernel/sched/sched.h | 1 +
>> 3 files changed, 21 insertions(+)
>>
>> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
>> index a96db50..f06aae3 100644
>> --- a/kernel/sched/pelt.c
>> +++ b/kernel/sched/pelt.c
>> @@ -353,6 +353,19 @@ int update_dl_rq_load_avg(u64 now, struct rq *rq, int running)
>> return 0;
>> }
>>
>> +int update_thermal_avg(u64 now, struct rq *rq, u64 capacity)
>
> All the other functions are named :
> update_cfs_rq/rt_rq/dl_rq/irq_load_avg
>
> might be good to keep similar name with update_thermal_load_avg
Sure. Will rename the function.
>
>> +{
>> + if (___update_load_sum(now, &rq->avg_thermal,
>> + capacity,
>> + capacity,
>> + capacity)) {
>> + ___update_load_avg(&rq->avg_thermal, 1, 1);
>> + return 1;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> #ifdef CONFIG_HAVE_SCHED_AVG_IRQ
>> /*
>> * irq:
>> diff --git a/kernel/sched/pelt.h b/kernel/sched/pelt.h
>> index afff644..01c5436 100644
>> --- a/kernel/sched/pelt.h
>> +++ b/kernel/sched/pelt.h
>> @@ -6,6 +6,7 @@ int __update_load_avg_se(u64 now, struct cfs_rq *cfs_rq, struct sched_entity *se
>> int __update_load_avg_cfs_rq(u64 now, struct cfs_rq *cfs_rq);
>> int update_rt_rq_load_avg(u64 now, struct rq *rq, int running);
>> int update_dl_rq_load_avg(u64 now, struct rq *rq, int running);
>> +int update_thermal_avg(u64 now, struct rq *rq, u64 capacity);
>>
>> #ifdef CONFIG_HAVE_SCHED_AVG_IRQ
>> int update_irq_load_avg(struct rq *rq, u64 running);
>> @@ -175,6 +176,12 @@ update_rq_clock_pelt(struct rq *rq, s64 delta) { }
>> static inline void
>> update_idle_rq_clock_pelt(struct rq *rq) { }
>>
>> +static inline int
>
> can you keep some function ordering as above and move
> update_thermal_avg() just after update_dl_rq_load_avg
will do.
Warm Regards
Thara
next prev parent reply other threads:[~2019-10-16 21:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 0:58 [Patch v3 0/7] Introduce Thermal Pressure Thara Gopinath
2019-10-14 0:58 ` [Patch v3 1/7] sched/pelt.c: Add support to track thermal pressure Thara Gopinath
2019-10-14 13:55 ` Vincent Guittot
2019-10-16 21:15 ` Thara Gopinath [this message]
2019-10-14 0:58 ` [Patch v3 2/7] sched: Add infrastructure to store and update instantaneous " Thara Gopinath
2019-10-14 15:50 ` Vincent Guittot
2019-10-16 21:22 ` Thara Gopinath
2019-10-17 8:44 ` Vincent Guittot
2019-10-17 16:40 ` Thara Gopinath
2019-10-18 8:05 ` Vincent Guittot
2019-10-14 0:58 ` [Patch v3 3/7] sched: Initialize per cpu thermal pressure structure Thara Gopinath
2019-10-14 0:58 ` [Patch v3 4/7] sched/fair: Enable CFS periodic tick to update thermal pressure Thara Gopinath
2019-10-14 0:58 ` [Patch v3 5/7] sched/fair: update cpu_capcity to reflect " Thara Gopinath
2019-10-14 0:58 ` [Patch v3 6/7] thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping Thara Gopinath
2019-10-14 0:58 ` [Patch v3 7/7] sched: thermal: Enable tuning of decay period Thara Gopinath
2019-10-15 10:14 ` Quentin Perret
2019-10-21 21:03 ` Thara Gopinath
2019-10-22 9:03 ` Quentin Perret
2019-10-22 20:36 ` Thara Gopinath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5DA7888C.3050406@linaro.org \
--to=thara.gopinath@linaro.org \
--cc=amit.kachhap@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=ionela.voinescu@arm.com \
--cc=javi.merino@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rui.zhang@intel.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox