[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200117114045.GA219309@google.com>
Date: Fri, 17 Jan 2020 11:40:45 +0000
From: Quentin Perret <qperret@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Thara Gopinath <thara.gopinath@...aro.org>, mingo@...hat.com,
ionela.voinescu@....com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rui.zhang@...el.com,
daniel.lezcano@...aro.org, viresh.kumar@...aro.org,
linux-kernel@...r.kernel.org, amit.kachhap@...il.com,
javi.merino@...nel.org, amit.kucheria@...durent.com,
kernel-team@...roid.com
Subject: Re: [Patch v8 4/7] sched/fair: Enable periodic update of average
thermal pressure
On Thursday 16 Jan 2020 at 16:15:02 (+0100), Peter Zijlstra wrote:
> > @@ -10275,6 +10281,7 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
> > {
> > struct cfs_rq *cfs_rq;
> > struct sched_entity *se = &curr->se;
> > + unsigned long thermal_pressure = arch_cpu_thermal_pressure(cpu_of(rq));
> >
> > for_each_sched_entity(se) {
> > cfs_rq = cfs_rq_of(se);
> > @@ -10286,6 +10293,7 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
> >
> > update_misfit_status(curr, rq);
> > update_overutilized_status(task_rq(curr));
> > + update_thermal_load_avg(rq_clock_task(rq), rq, thermal_pressure);
> > }
>
> I'm thinking this is the wrong place; should this not be in
> scheduler_tick(), right before calling sched_class::task_tick() ? Surely
> any execution will affect thermals, not only fair class execution.
Right, but right now only CFS takes action when we overheat. That is,
only CFS uses capacity_of() which is where the thermal signal gets
reflected.
We definitely could (and maybe should) make RT and DL react to thermal
pressure as well when they're both capacity-aware. But perhaps that's
for later ? Thoughts ?
Thanks,
Quentin
Powered by blists - more mailing lists