Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-05-08 Thread Quentin Perret
Hi Thara, Sorry for the delayed response. On Friday 26 Apr 2019 at 10:17:56 (-0400), Thara Gopinath wrote: > On 04/25/2019 08:45 AM, Vincent Guittot wrote: > > Do you mean calling a variant of sched_update_thermal_pressure() in > > update_cpu_capacity() instead of periodic update ? > > Yes ,

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-26 Thread Thara Gopinath
On 04/25/2019 08:45 AM, Vincent Guittot wrote: > On Thu, 25 Apr 2019 at 12:57, Quentin Perret 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;

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-25 Thread Quentin Perret
On Thursday 25 Apr 2019 at 14:45:57 (+0200), Vincent Guittot wrote: > On Thu, 25 Apr 2019 at 12:57, Quentin Perret 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 { > >

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-25 Thread Vincent Guittot
On Thu, 25 Apr 2019 at 12:57, Quentin Perret 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*/ > >

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-25 Thread Quentin Perret
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

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-24 Thread Peter Zijlstra
On Tue, Apr 16, 2019 at 03:38:39PM -0400, Thara Gopinath wrote: > +static void __init init_thermal_pressure(void) > +{ > + struct thermal_pressure *cpu_thermal; > + unsigned long scale; > + int cpu; > + > + pr_debug("Init thermal pressure\n"); > + for_each_possible_cpu(cpu) { >

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-24 Thread Peter Zijlstra
On Tue, Apr 16, 2019 at 03:38:39PM -0400, Thara Gopinath wrote: > +static void thermal_pressure_update(struct thermal_pressure *cpu_thermal, > + unsigned long cap_max_freq, > + unsigned long max_freq, bool change_scale) > +{ > +

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-23 Thread Thara Gopinath
On 04/18/2019 06:14 AM, Quentin Perret wrote: > On Tuesday 16 Apr 2019 at 15:38:39 (-0400), Thara Gopinath wrote: >> +/** >> + * Function to update thermal pressure from cooling device >> + * or any framework responsible for capping cpu maximum >> + * capacity. >> + */ >> +void

Re: [PATCH V2 1/3] Calculate Thermal Pressure

2019-04-18 Thread Quentin Perret
On Tuesday 16 Apr 2019 at 15:38:39 (-0400), Thara Gopinath wrote: > +/** > + * Function to update thermal pressure from cooling device > + * or any framework responsible for capping cpu maximum > + * capacity. > + */ > +void sched_update_thermal_pressure(struct cpumask *cpus, > +

[PATCH V2 1/3] Calculate Thermal Pressure

2019-04-16 Thread Thara Gopinath
Add thermal.c and thermal.h files that provides interface APIs to initialize, update/average, track, accumulate and decay thermal pressure per cpu basis. A per cpu structure thermal_pressure is introduced to keep track of instantaneous per cpu thermal pressure. Per cpu timers are scheduled to