lkml.org 
[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch v5 6/6] sched/fair: Enable tuning of decay period
From
Date
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;
> +}

\
 
 \ /
  Last update: 2019-11-08 11:54    [W:0.064 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site