diff mbox

thermal: remove power allocator from list of default governors

Message ID 20150804163921.GA36852@dtor-ws (mailing list archive)
State Superseded, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Dmitry Torokhov Aug. 4, 2015, 4:39 p.m. UTC
As it currently stands the power allocator governor can not handle
thermal zones that are not specifically crafted and therefore can not be
used as a default governor.

Users need to explicitly enable this governor for thermal zones that do
have enough information for its operation.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/thermal/Kconfig | 8 --------
 1 file changed, 8 deletions(-)

Comments

Javi Merino Aug. 5, 2015, 8:37 a.m. UTC | #1
On Tue, Aug 04, 2015 at 05:39:21PM +0100, Dmitry Torokhov wrote:
> As it currently stands the power allocator governor can not handle
> thermal zones that are not specifically crafted and therefore can not be
> used as a default governor.
> 
> Users need to explicitly enable this governor for thermal zones that do
> have enough information for its operation.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/thermal/Kconfig | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 0390044..34d05d3 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -82,14 +82,6 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
>  	  Select this if you want to let the user space manage the
>  	  platform thermals.
>  
> -config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
> -	bool "power_allocator"
> -	select THERMAL_GOV_POWER_ALLOCATOR
> -	help
> -	  Select this if you want to control temperature based on
> -	  system and device power allocation. This governor can only
> -	  operate on cooling devices that implement the power API.
> -

Currently the only way we have for a thermal zone configured from
device tree to use a governor from the kernel boot is by using
THERMAL_DEFAULT_GOV_*.  If we remove this option some devices won't
have a workable thermal framework until userspace is up and running.

Would you rather have the power allocator governor accept every
thermal zone?

Cheers,
Javi
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
srinivas pandruvada Aug. 5, 2015, 4:18 p.m. UTC | #2
On Wed, 2015-08-05 at 09:37 +0100, Javi Merino wrote:
> On Tue, Aug 04, 2015 at 05:39:21PM +0100, Dmitry Torokhov wrote:
> > As it currently stands the power allocator governor can not handle
> > thermal zones that are not specifically crafted and therefore can not be
> > used as a default governor.
> > 
> > Users need to explicitly enable this governor for thermal zones that do
> > have enough information for its operation.
> > 
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
> >  drivers/thermal/Kconfig | 8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > index 0390044..34d05d3 100644
> > --- a/drivers/thermal/Kconfig
> > +++ b/drivers/thermal/Kconfig
> > @@ -82,14 +82,6 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
> >  	  Select this if you want to let the user space manage the
> >  	  platform thermals.
> >  
> > -config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
> > -	bool "power_allocator"
> > -	select THERMAL_GOV_POWER_ALLOCATOR
> > -	help
> > -	  Select this if you want to control temperature based on
> > -	  system and device power allocation. This governor can only
> > -	  operate on cooling devices that implement the power API.
> > -
> 
> Currently the only way we have for a thermal zone configured from
> device tree to use a governor from the kernel boot is by using
> THERMAL_DEFAULT_GOV_*.  If we remove this option some devices won't
> have a workable thermal framework until userspace is up and running.
> 
> Would you rather have the power allocator governor accept every
> thermal zone?
May be allow to select when the binded cooling device can support this
governor.

Thanks,
Srinivas

> Cheers,
> Javi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov Aug. 5, 2015, 4:35 p.m. UTC | #3
On Wed, Aug 05, 2015 at 09:37:55AM +0100, Javi Merino wrote:
> On Tue, Aug 04, 2015 at 05:39:21PM +0100, Dmitry Torokhov wrote:
> > As it currently stands the power allocator governor can not handle
> > thermal zones that are not specifically crafted and therefore can not be
> > used as a default governor.
> > 
> > Users need to explicitly enable this governor for thermal zones that do
> > have enough information for its operation.
> > 
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
> >  drivers/thermal/Kconfig | 8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > index 0390044..34d05d3 100644
> > --- a/drivers/thermal/Kconfig
> > +++ b/drivers/thermal/Kconfig
> > @@ -82,14 +82,6 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
> >  	  Select this if you want to let the user space manage the
> >  	  platform thermals.
> >  
> > -config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
> > -	bool "power_allocator"
> > -	select THERMAL_GOV_POWER_ALLOCATOR
> > -	help
> > -	  Select this if you want to control temperature based on
> > -	  system and device power allocation. This governor can only
> > -	  operate on cooling devices that implement the power API.
> > -
> 
> Currently the only way we have for a thermal zone configured from
> device tree to use a governor from the kernel boot is by using
> THERMAL_DEFAULT_GOV_*.  If we remove this option some devices won't
> have a workable thermal framework until userspace is up and running.

Why would step wise, or fair share be not workable (even if not optimal)
thermal frameworks? It doe snot take that long to get to [early]
userspace. Half of the boot time the thermal framework is not working
anyway because half of the devices that can act as colling devices are
not yet logically there.

> 
> Would you rather have the power allocator governor accept every
> thermal zone?

If it is to be one of default governors then yes, it needs to be able to
manage all thermal zones, the same way as the other 3 governors can, as
far as I know.

Thanks.
Eduardo Valentin Aug. 5, 2015, 6:49 p.m. UTC | #4
On Wed, Aug 05, 2015 at 09:35:39AM -0700, Dmitry Torokhov wrote:
> On Wed, Aug 05, 2015 at 09:37:55AM +0100, Javi Merino wrote:
> > On Tue, Aug 04, 2015 at 05:39:21PM +0100, Dmitry Torokhov wrote:
> > > As it currently stands the power allocator governor can not handle
> > > thermal zones that are not specifically crafted and therefore can not be
> > > used as a default governor.
> > > 
> > > Users need to explicitly enable this governor for thermal zones that do
> > > have enough information for its operation.
> > > 
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > ---
> > >  drivers/thermal/Kconfig | 8 --------
> > >  1 file changed, 8 deletions(-)
> > > 
> > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > > index 0390044..34d05d3 100644
> > > --- a/drivers/thermal/Kconfig
> > > +++ b/drivers/thermal/Kconfig
> > > @@ -82,14 +82,6 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
> > >  	  Select this if you want to let the user space manage the
> > >  	  platform thermals.
> > >  
> > > -config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
> > > -	bool "power_allocator"
> > > -	select THERMAL_GOV_POWER_ALLOCATOR
> > > -	help
> > > -	  Select this if you want to control temperature based on
> > > -	  system and device power allocation. This governor can only
> > > -	  operate on cooling devices that implement the power API.
> > > -
> > 
> > Currently the only way we have for a thermal zone configured from
> > device tree to use a governor from the kernel boot is by using
> > THERMAL_DEFAULT_GOV_*.  If we remove this option some devices won't
> > have a workable thermal framework until userspace is up and running.
> 
> Why would step wise, or fair share be not workable (even if not optimal)
> thermal frameworks? It doe snot take that long to get to [early]
> userspace. Half of the boot time the thermal framework is not working
> anyway because half of the devices that can act as colling devices are
> not yet logically there.
> 
> > 
> > Would you rather have the power allocator governor accept every
> > thermal zone?
> 
> If it is to be one of default governors then yes, it needs to be able to
> manage all thermal zones, the same way as the other 3 governors can, as
> far as I know.

I believe fairshare also relies on platform data to be properly set,
otherwise, it would not be functional. That's probably why I overlooked
this point. That said, I would say, if we follow this logic, a similar
patch is needed for fairshare.

Javi, ideally, the governor would need to have a workable
default settings for any thermal zone that miss the platform settings.
Do you think it would be doable for power allocator?

BR,

> 
> Thanks.
> 
> -- 
> Dmitry
Javi Merino Aug. 6, 2015, 8:30 a.m. UTC | #5
On Wed, Aug 05, 2015 at 07:49:41PM +0100, Eduardo Valentin wrote:
> On Wed, Aug 05, 2015 at 09:35:39AM -0700, Dmitry Torokhov wrote:
> > On Wed, Aug 05, 2015 at 09:37:55AM +0100, Javi Merino wrote:
> > > On Tue, Aug 04, 2015 at 05:39:21PM +0100, Dmitry Torokhov wrote:
> > > > As it currently stands the power allocator governor can not handle
> > > > thermal zones that are not specifically crafted and therefore can not be
> > > > used as a default governor.
> > > > 
> > > > Users need to explicitly enable this governor for thermal zones that do
> > > > have enough information for its operation.
> > > > 
> > > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > ---
> > > >  drivers/thermal/Kconfig | 8 --------
> > > >  1 file changed, 8 deletions(-)
> > > > 
> > > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > > > index 0390044..34d05d3 100644
> > > > --- a/drivers/thermal/Kconfig
> > > > +++ b/drivers/thermal/Kconfig
> > > > @@ -82,14 +82,6 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
> > > >  	  Select this if you want to let the user space manage the
> > > >  	  platform thermals.
> > > >  
> > > > -config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
> > > > -	bool "power_allocator"
> > > > -	select THERMAL_GOV_POWER_ALLOCATOR
> > > > -	help
> > > > -	  Select this if you want to control temperature based on
> > > > -	  system and device power allocation. This governor can only
> > > > -	  operate on cooling devices that implement the power API.
> > > > -
> > > 
> > > Currently the only way we have for a thermal zone configured from
> > > device tree to use a governor from the kernel boot is by using
> > > THERMAL_DEFAULT_GOV_*.  If we remove this option some devices won't
> > > have a workable thermal framework until userspace is up and running.
> > 
> > Why would step wise, or fair share be not workable (even if not optimal)
> > thermal frameworks? It doe snot take that long to get to [early]
> > userspace. Half of the boot time the thermal framework is not working
> > anyway because half of the devices that can act as colling devices are
> > not yet logically there.
> > 
> > > 
> > > Would you rather have the power allocator governor accept every
> > > thermal zone?
> > 
> > If it is to be one of default governors then yes, it needs to be able to
> > manage all thermal zones, the same way as the other 3 governors can, as
> > far as I know.
> 
> I believe fairshare also relies on platform data to be properly set,
> otherwise, it would not be functional. That's probably why I overlooked
> this point. That said, I would say, if we follow this logic, a similar
> patch is needed for fairshare.
> 
> Javi, ideally, the governor would need to have a workable
> default settings for any thermal zone that miss the platform settings.
> Do you think it would be doable for power allocator?

Yes, we can come up with something that accepts any thermal zone.
I'll send a patch soon.

Cheers,
Javi
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Javi Merino Aug. 10, 2015, 4:04 p.m. UTC | #6
Relax the thermal governor requirements of sustainable_power and at
least two trip points so that it can be bound to any thermal zone.
Its behavior won't be optimal, it would be the best it can with the
data provided.

Javi Merino (3):
  thermal: power_allocator: relax the requirement of a sustainable_power
    in tzp
  thermal: power_allocator: relax the requirement of two passive trip   
     points
  thermal: power_allocator: exit early if there are no cooling devices

 Documentation/thermal/power_allocator.txt |   2 +-
 drivers/thermal/power_allocator.c         | 158 +++++++++++++++++++++---------
 drivers/thermal/thermal_core.c            |  28 ++++++
 include/linux/thermal.h                   |   6 ++
 4 files changed, 144 insertions(+), 50 deletions(-)
Javi Merino Aug. 11, 2015, 10:21 a.m. UTC | #7
Relax the thermal governor requirements of sustainable_power and at
least two trip points so that it can be bound to any thermal zone.
Its behavior won't be optimal, it would be the best it can with the
data provided.

Changes since v1:
  - Let the power allocator governor operate if the thermal zone
    doesn't have tzp as suggested by Chung-yih Wang

Javi Merino (4):
  thermal: power_allocator: relax the requirement of a sustainable_power
    in tzp
  thermal: power_allocator: relax the requirement of two passive trip   
     points
  thermal: power_allocator: don't require tzp to be present for the
    thermal zone
  thermal: power_allocator: exit early if there are no cooling devices

 Documentation/thermal/power_allocator.txt |   2 +-
 drivers/thermal/power_allocator.c         | 178 ++++++++++++++++++++++--------
 drivers/thermal/thermal_core.c            |  28 +++++
 include/linux/thermal.h                   |   6 +
 4 files changed, 165 insertions(+), 49 deletions(-)
Javi Merino Aug. 17, 2015, 5:36 p.m. UTC | #8
Relax the thermal governor requirements of sustainable_power and at
least two trip points so that it can be bound to any thermal zone.
Its behavior won't be optimal, it would be the best it can with the
data provided.

Changes since v2:
  - Typos suggested by Daniel Kurtz

Changes since v1:
  - Let the power allocator governor operate if the thermal zone
    doesn't have tzp as suggested by Chung-yih Wang

Javi Merino (4):
  thermal: power_allocator: relax the requirement of a sustainable_power
    in tzp
  thermal: power_allocator: relax the requirement of two passive trip   
     points
  thermal: power_allocator: don't require tzp to be present for the
    thermal zone
  thermal: power_allocator: exit early if there are no cooling devices

 Documentation/thermal/power_allocator.txt |   2 +-
 drivers/thermal/power_allocator.c         | 178 ++++++++++++++++++++++--------
 drivers/thermal/thermal_core.c            |  28 +++++
 include/linux/thermal.h                   |   6 +
 4 files changed, 165 insertions(+), 49 deletions(-)
Javi Merino Aug. 26, 2015, 1:26 p.m. UTC | #9
Relax the thermal governor requirements of sustainable_power and at
least two trip points so that it can be bound to any thermal zone.
Its behavior won't be optimal, it would be the best it can with the
data provided.

Changes since v3:
   - Don't hardcode a value for sustainable power and re-estimate
     the PID controllers every time if no sustainable power is given
     as suggested by Eduardo Valentin.
   - power_actor_get_min_power() moved to a patch of its own.

Changes since v2:
  - Typos suggested by Daniel Kurtz

Changes since v1:
  - Let the power allocator governor operate if the thermal zone
    doesn't have tzp as suggested by Chung-yih Wang

Javi Merino (5):
  thermal: Add a function to get the minimum power
  thermal: power_allocator: relax the requirement of a sustainable_power
    in tzp
  thermal: power_allocator: relax the requirement of two passive trip   
     points
  thermal: power_allocator: don't require tzp to be present for the
    thermal zone
  thermal: power_allocator: exit early if there are no cooling devices

 Documentation/thermal/power_allocator.txt |   2 +-
 drivers/thermal/power_allocator.c         | 241 ++++++++++++++++++++++--------
 drivers/thermal/thermal_core.c            |  28 ++++
 include/linux/thermal.h                   |   6 +
 4 files changed, 212 insertions(+), 65 deletions(-)
Javi Merino Sept. 2, 2015, 3:11 p.m. UTC | #10
On Wed, Aug 26, 2015 at 02:26:39PM +0100, Javi Merino wrote:
> Relax the thermal governor requirements of sustainable_power and at
> least two trip points so that it can be bound to any thermal zone.
> Its behavior won't be optimal, it would be the best it can with the
> data provided.
> 
> Changes since v3:
>    - Don't hardcode a value for sustainable power and re-estimate
>      the PID controllers every time if no sustainable power is given
>      as suggested by Eduardo Valentin.
>    - power_actor_get_min_power() moved to a patch of its own.
> 
> Changes since v2:
>   - Typos suggested by Daniel Kurtz
> 
> Changes since v1:
>   - Let the power allocator governor operate if the thermal zone
>     doesn't have tzp as suggested by Chung-yih Wang
> 
> Javi Merino (5):
>   thermal: Add a function to get the minimum power
>   thermal: power_allocator: relax the requirement of a sustainable_power
>     in tzp
>   thermal: power_allocator: relax the requirement of two passive trip   
>      points
>   thermal: power_allocator: don't require tzp to be present for the
>     thermal zone
>   thermal: power_allocator: exit early if there are no cooling devices
> 
>  Documentation/thermal/power_allocator.txt |   2 +-
>  drivers/thermal/power_allocator.c         | 241 ++++++++++++++++++++++--------
>  drivers/thermal/thermal_core.c            |  28 ++++
>  include/linux/thermal.h                   |   6 +
>  4 files changed, 212 insertions(+), 65 deletions(-)

Gentle ping.
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Javi Merino Sept. 7, 2015, 1:19 p.m. UTC | #11
Relax the thermal governor requirements of sustainable_power and at
least two trip points so that it can be bound to any thermal zone.
Its behavior won't be optimal, it would be the best possible with the
data provided.

Changes since v4:
   - Fix crash when a thermal zone with no trip points has no
     get_trip_point_temp().  Reported by Daniel Kurtz.
   - s/estimate_controller_constants()/estimate_pid_constants()/g

Changes since v3:
   - Don't hardcode a value for sustainable power and re-estimate
     the PID controllers every time if no sustainable power is given
     as suggested by Eduardo Valentin.
   - power_actor_get_min_power() moved to a patch of its own.

Changes since v2:
  - Typos suggested by Daniel Kurtz

Changes since v1:
  - Let the power allocator governor operate if the thermal zone
    doesn't have tzp as suggested by Chung-yih Wang

Javi Merino (5):
  thermal: Add a function to get the minimum power
  thermal: power_allocator: relax the requirement of a sustainable_power
    in tzp
  thermal: power_allocator: relax the requirement of two passive trip   
     points
  thermal: power_allocator: don't require tzp to be present for the
    thermal zone
  thermal: power_allocator: exit early if there are no cooling devices

 Documentation/thermal/power_allocator.txt |   2 +-
 drivers/thermal/power_allocator.c         | 243 ++++++++++++++++++++++--------
 drivers/thermal/thermal_core.c            |  28 ++++
 include/linux/thermal.h                   |   6 +
 4 files changed, 214 insertions(+), 65 deletions(-)
Daniel Kurtz Sept. 8, 2015, 1:46 a.m. UTC | #12
Hi Javi,

On Mon, Sep 7, 2015 at 9:19 PM, Javi Merino <javi.merino@arm.com> wrote:
> Relax the thermal governor requirements of sustainable_power and at
> least two trip points so that it can be bound to any thermal zone.
> Its behavior won't be optimal, it would be the best possible with the
> data provided.

I tested this whole series on my MT8173 board with a battery thermal
zone with no trip points, so, for this whole series (not sure if both
are needed, so take your pick):

Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>

I am a bit confused by MAINTAINERS for drivers/thermal.
Will these patches be picked up by Eduardo or Zhang?

Thanks!
-Dan

> Changes since v4:
>    - Fix crash when a thermal zone with no trip points has no
>      get_trip_point_temp().  Reported by Daniel Kurtz.
>    - s/estimate_controller_constants()/estimate_pid_constants()/g
>
> Changes since v3:
>    - Don't hardcode a value for sustainable power and re-estimate
>      the PID controllers every time if no sustainable power is given
>      as suggested by Eduardo Valentin.
>    - power_actor_get_min_power() moved to a patch of its own.
>
> Changes since v2:
>   - Typos suggested by Daniel Kurtz
>
> Changes since v1:
>   - Let the power allocator governor operate if the thermal zone
>     doesn't have tzp as suggested by Chung-yih Wang
>
> Javi Merino (5):
>   thermal: Add a function to get the minimum power
>   thermal: power_allocator: relax the requirement of a sustainable_power
>     in tzp
>   thermal: power_allocator: relax the requirement of two passive trip
>      points
>   thermal: power_allocator: don't require tzp to be present for the
>     thermal zone
>   thermal: power_allocator: exit early if there are no cooling devices
>
>  Documentation/thermal/power_allocator.txt |   2 +-
>  drivers/thermal/power_allocator.c         | 243 ++++++++++++++++++++++--------
>  drivers/thermal/thermal_core.c            |  28 ++++
>  include/linux/thermal.h                   |   6 +
>  4 files changed, 214 insertions(+), 65 deletions(-)
>
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eduardo Valentin Sept. 14, 2015, 3:04 a.m. UTC | #13
Javi,

On Wed, Aug 26, 2015 at 02:26:39PM +0100, Javi Merino wrote:
> Relax the thermal governor requirements of sustainable_power and at
> least two trip points so that it can be bound to any thermal zone.
> Its behavior won't be optimal, it would be the best it can with the
> data provided.
> 
> Changes since v3:
>    - Don't hardcode a value for sustainable power and re-estimate
>      the PID controllers every time if no sustainable power is given
>      as suggested by Eduardo Valentin.
>    - power_actor_get_min_power() moved to a patch of its own.
> 
> Changes since v2:
>   - Typos suggested by Daniel Kurtz
> 
> Changes since v1:
>   - Let the power allocator governor operate if the thermal zone
>     doesn't have tzp as suggested by Chung-yih Wang
> 
> Javi Merino (5):
>   thermal: Add a function to get the minimum power
>   thermal: power_allocator: relax the requirement of a sustainable_power
>     in tzp
>   thermal: power_allocator: relax the requirement of two passive trip   
>      points
>   thermal: power_allocator: don't require tzp to be present for the
>     thermal zone
>   thermal: power_allocator: exit early if there are no cooling devices

This patch set does not apply clean. Could you please refresh it?

> 
>  Documentation/thermal/power_allocator.txt |   2 +-
>  drivers/thermal/power_allocator.c         | 241 ++++++++++++++++++++++--------
>  drivers/thermal/thermal_core.c            |  28 ++++
>  include/linux/thermal.h                   |   6 +
>  4 files changed, 212 insertions(+), 65 deletions(-)
> 
> -- 
> 1.9.1
>
Javi Merino Sept. 14, 2015, 1:23 p.m. UTC | #14
Relax the thermal governor requirements of sustainable_power and at
least two trip points so that it can be bound to any thermal zone.
Its behavior won't be optimal, it would be the best possible with the
data provided.

Changes since v5:
   - Rebased on top of v4.3-rc1

Changes since v4:
   - Fix crash when a thermal zone with no trip points has no
     get_trip_point_temp().  Reported by Daniel Kurtz.
   - s/estimate_controller_constants()/estimate_pid_constants()/g

Changes since v3:
   - Don't hardcode a value for sustainable power and re-estimate
     the PID controllers every time if no sustainable power is given
     as suggested by Eduardo Valentin.
   - power_actor_get_min_power() moved to a patch of its own.

Changes since v2:
  - Typos suggested by Daniel Kurtz

Changes since v1:
  - Let the power allocator governor operate if the thermal zone
    doesn't have tzp as suggested by Chung-yih Wang

Javi Merino (5):
  thermal: Add a function to get the minimum power
  thermal: power_allocator: relax the requirement of a sustainable_power
    in tzp
  thermal: power_allocator: relax the requirement of two passive trip   
     points
  thermal: power_allocator: don't require tzp to be present for the
    thermal zone
  thermal: power_allocator: exit early if there are no cooling devices

 Documentation/thermal/power_allocator.txt |   2 +-
 drivers/thermal/power_allocator.c         | 243 ++++++++++++++++++++++--------
 drivers/thermal/thermal_core.c            |  28 ++++
 include/linux/thermal.h                   |   6 +
 4 files changed, 214 insertions(+), 65 deletions(-)
Javi Merino Sept. 14, 2015, 1:32 p.m. UTC | #15
On Mon, Sep 14, 2015 at 04:04:16AM +0100, Eduardo Valentin wrote:
> Javi,
> 
> On Wed, Aug 26, 2015 at 02:26:39PM +0100, Javi Merino wrote:
> > Relax the thermal governor requirements of sustainable_power and at
> > least two trip points so that it can be bound to any thermal zone.
> > Its behavior won't be optimal, it would be the best it can with the
> > data provided.
> > 
> > Changes since v3:
> >    - Don't hardcode a value for sustainable power and re-estimate
> >      the PID controllers every time if no sustainable power is given
> >      as suggested by Eduardo Valentin.
> >    - power_actor_get_min_power() moved to a patch of its own.
> > 
> > Changes since v2:
> >   - Typos suggested by Daniel Kurtz
> > 
> > Changes since v1:
> >   - Let the power allocator governor operate if the thermal zone
> >     doesn't have tzp as suggested by Chung-yih Wang
> > 
> > Javi Merino (5):
> >   thermal: Add a function to get the minimum power
> >   thermal: power_allocator: relax the requirement of a sustainable_power
> >     in tzp
> >   thermal: power_allocator: relax the requirement of two passive trip   
> >      points
> >   thermal: power_allocator: don't require tzp to be present for the
> >     thermal zone
> >   thermal: power_allocator: exit early if there are no cooling devices
> 
> This patch set does not apply clean. Could you please refresh it?

I've sent a v6 that's rebased on top of v4.3-rc1

Cheers,
Javi
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 0390044..34d05d3 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -82,14 +82,6 @@  config THERMAL_DEFAULT_GOV_USER_SPACE
 	  Select this if you want to let the user space manage the
 	  platform thermals.
 
-config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
-	bool "power_allocator"
-	select THERMAL_GOV_POWER_ALLOCATOR
-	help
-	  Select this if you want to control temperature based on
-	  system and device power allocation. This governor can only
-	  operate on cooling devices that implement the power API.
-
 endchoice
 
 config THERMAL_GOV_FAIR_SHARE