lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V2 1/3] Calculate Thermal Pressure
On Thu, 25 Apr 2019 at 12:57, Quentin Perret <quentin.perret@arm.com> wrote:
>
> On Tuesday 16 Apr 2019 at 15:38:39 (-0400), Thara Gopinath wrote:
> > +/* Per cpu structure to keep track of Thermal Pressure */
> > +struct thermal_pressure {
> > + unsigned long scale; /* scale reflecting average cpu max capacity*/
> > + unsigned long acc_scale; /* Accumulated scale for this time window */
> > + unsigned long old_scale; /* Scale value for the previous window */
> > + unsigned long raw_scale; /* Raw max capacity */
> > + unsigned long age_stamp; /* Last time old_scale was updated */
> > + unsigned long last_update; /* Last time acc_scale was updated */
> > + spinlock_t lock; /* Lock for protecting from simultaneous access*/
> > + /* Timer for periodic update of thermal pressure */
> > + struct timer_list timer;
>
> Do you actually need the periodic update ? You only really need to
> update the 'scale' value when updating the LB stats no ? Nobody
> accesses that value in between two LBs.

Do you mean calling a variant of sched_update_thermal_pressure() in
update_cpu_capacity() instead of periodic update ?
Yes , that should be enough

>
> Thanks,
> Quentin

\
 
 \ /
  Last update: 2019-04-25 14:47    [W:0.108 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site