Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-04-04 Thread Viresh Kumar
On 04-04-18, 10:50, Daniel Lezcano wrote: > Mmh, that sounds very complex. May be it is simpler to count the number > of cluster and initialize the idle_cdev for each cluster and then go for > this loop with the cluster cpumask. Maybe not sure. I have had such code in the past and it was quite str

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-04-04 Thread Daniel Lezcano
On 26/02/2018 05:30, Viresh Kumar wrote: [ ... ] + + for_each_possible_cpu(cpu) { + cpumask = topology_core_cpumask(cpu); + + cct = per_cpu_ptr(&cpuidle_cooling_tsk, cpu); + + /* + * This condition makes the first cpu b

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-27 Thread Juri Lelli
On 27/03/18 14:31, Daniel Lezcano wrote: > On 27/03/2018 14:28, Juri Lelli wrote: > > Hi Daniel, > > > > On 27/03/18 12:26, Daniel Lezcano wrote: > >> On 27/03/2018 04:03, Leo Yan wrote: > >>> Hi Daniel, > >>> > >>> On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: > The cpu idl

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-27 Thread Daniel Lezcano
On 27/03/2018 14:28, Juri Lelli wrote: > Hi Daniel, > > On 27/03/18 12:26, Daniel Lezcano wrote: >> On 27/03/2018 04:03, Leo Yan wrote: >>> Hi Daniel, >>> >>> On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: The cpu idle cooling driver performs synchronized idle injection acros

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-27 Thread Juri Lelli
Hi Daniel, On 27/03/18 12:26, Daniel Lezcano wrote: > On 27/03/2018 04:03, Leo Yan wrote: > > Hi Daniel, > > > > On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: > >> The cpu idle cooling driver performs synchronized idle injection across all > >> cpus belonging to the same cluster

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-27 Thread Daniel Lezcano
On 27/03/2018 05:43, Leo Yan wrote: > On Fri, Feb 23, 2018 at 12:28:51PM +0100, Daniel Lezcano wrote: >> On 23/02/2018 08:34, Viresh Kumar wrote: >>> On 21-02-18, 16:29, Daniel Lezcano wrote: > >> [ ... ] >> +static s64 cpuidle_cooling_runtime(struct cpuidle_cooling_device *idle_cdev) >

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-27 Thread Daniel Lezcano
On 27/03/2018 05:35, Leo Yan wrote: > On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: > > [...] > >> +/** >> + * cpuidle_cooling_injection_thread - Idle injection mainloop thread >> function >> + * @arg: a void pointer containing the idle cooling device address >> + * >> + * This

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-27 Thread Daniel Lezcano
On 27/03/2018 04:03, Leo Yan wrote: > Hi Daniel, > > On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: >> The cpu idle cooling driver performs synchronized idle injection across all >> cpus belonging to the same cluster and offers a new method to cool down a >> SoC. >> >> Each clust

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-26 Thread Leo Yan
On Fri, Feb 23, 2018 at 12:28:51PM +0100, Daniel Lezcano wrote: > On 23/02/2018 08:34, Viresh Kumar wrote: > > On 21-02-18, 16:29, Daniel Lezcano wrote: > [ ... ] > > >> +static s64 cpuidle_cooling_runtime(struct cpuidle_cooling_device > >> *idle_cdev) > >> +{ > >> + s64 next_wakeup; > >> + in

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-26 Thread Leo Yan
On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: [...] > +/** > + * cpuidle_cooling_injection_thread - Idle injection mainloop thread function > + * @arg: a void pointer containing the idle cooling device address > + * > + * This main function does basically two operations: > + * >

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-26 Thread Leo Yan
Hi Daniel, On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: > The cpu idle cooling driver performs synchronized idle injection across all > cpus belonging to the same cluster and offers a new method to cool down a SoC. > > Each cluster has its own idle cooling device, each core has

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-13 Thread Daniel Lezcano
On 26/02/2018 05:30, Viresh Kumar wrote: [ ... ] + /* + * The last CPU waking up is in charge of setting the + * timer. If the CPU is hotplugged, the timer will + * move to another CPU (which may not belong to the + * same

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-02-25 Thread Viresh Kumar
On 23-02-18, 12:28, Daniel Lezcano wrote: > On 23/02/2018 08:34, Viresh Kumar wrote: > > On 21-02-18, 16:29, Daniel Lezcano wrote: > >> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > >> index 5c219dc..9340216 100644 > >> --- a/drivers/thermal/cpu_cooling.c > >> +++ b/d

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-02-24 Thread Daniel Lezcano
On 23/02/2018 16:26, Vincent Guittot wrote: > Hi Daniel, > > On 21 February 2018 at 16:29, Daniel Lezcano > wrote: >> + >> +/** >> + * struct cpuidle_cooling_device - data for the idle cooling device >> + * @cdev: a pointer to a struct thermal_cooling_device >> + * @cpumask: a cpumask containing

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-02-23 Thread Vincent Guittot
Hi Daniel, On 21 February 2018 at 16:29, Daniel Lezcano wrote: > + > +/** > + * struct cpuidle_cooling_device - data for the idle cooling device > + * @cdev: a pointer to a struct thermal_cooling_device > + * @cpumask: a cpumask containing the CPU managed by the cooling device > + * @timer: a hrt

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-02-23 Thread Daniel Lezcano
On 23/02/2018 08:34, Viresh Kumar wrote: > On 21-02-18, 16:29, Daniel Lezcano wrote: >> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c >> index 5c219dc..9340216 100644 >> --- a/drivers/thermal/cpu_cooling.c >> +++ b/drivers/thermal/cpu_cooling.c >> @@ -10,18 +10,32 @@ >>

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-02-22 Thread Viresh Kumar
On 21-02-18, 16:29, Daniel Lezcano wrote: > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > index 5c219dc..9340216 100644 > --- a/drivers/thermal/cpu_cooling.c > +++ b/drivers/thermal/cpu_cooling.c > @@ -10,18 +10,32 @@ > * Viresh Kumar > * > */ > +#und

[PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-02-21 Thread Daniel Lezcano
The cpu idle cooling driver performs synchronized idle injection across all cpus belonging to the same cluster and offers a new method to cool down a SoC. Each cluster has its own idle cooling device, each core has its own idle injection thread, each idle injection thread uses play_idle to enter i