lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200117123103.GB14879@hirez.programming.kicks-ass.net>
Date:   Fri, 17 Jan 2020 13:31:03 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Quentin Perret <qperret@...gle.com>
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 Fri, Jan 17, 2020 at 11:40:45AM +0000, Quentin Perret wrote:
> 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.

Sure, but we should still track the thermals unconditionally, even if
only CFS consumes it.

> 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 ?

Yeah, that's later head-aches. Even determining what to do there, except
panic() is going to be 'interesting'.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ