Messages in this thread | | | Subject | Re: [Patch v5 6/6] sched/fair: Enable tuning of decay period | From | Dietmar Eggemann <> | Date | Fri, 8 Nov 2019 11:53:05 +0100 |
| |
On 07/11/2019 11:49, Vincent Guittot wrote: > Le Tuesday 05 Nov 2019 à 13:49:46 (-0500), Thara Gopinath a écrit :
[...]
>> /** >> @@ -10444,8 +10465,8 @@ void update_thermal_pressure(int cpu, unsigned long capped_capacity) >> static void trigger_thermal_pressure_average(struct rq *rq) >> { >> #ifdef CONFIG_SMP >> - update_thermal_load_avg(rq_clock_task(rq), rq, >> - per_cpu(thermal_pressure, cpu_of(rq))); >> + update_thermal_load_avg(rq_clock_task(rq) >> sched_thermal_decay_shift, >> + rq, per_cpu(thermal_pressure, cpu_of(rq))); > > Would be better to create > > +static inline u64 rq_clock_thermal(struct rq *rq) > +{ > + lockdep_assert_held(&rq->lock); > + assert_clock_updated(rq);
IMHO, the asserts can be skipped here since they're already done in rq_clock_task().
> + return rq_clock_task(rq) >> sched_thermal_decay_shift; > +}
| |