All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: "R, Durgadoss" <durgadoss.r@intel.com>
Cc: "lenb@kernel.org" <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"eduardo.valentin@ti.com" <eduardo.valentin@ti.com>
Subject: RE: [PATCHv4 11/15] Thermal: Introduce a step_wise thermal governor
Date: Tue, 18 Sep 2012 16:22:00 +0800	[thread overview]
Message-ID: <1347956520.1682.1231.camel@rui.sh.intel.com> (raw)
In-Reply-To: <4D68720C2E767A4AA6A8796D42C8EB591BD338@BGSMSX101.gar.corp.intel.com>

On 二, 2012-09-18 at 02:11 -0600, R, Durgadoss wrote:
> Hi Rui,
> 
> 
> > -----Original Message-----
> > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> > owner@vger.kernel.org] On Behalf Of Zhang Rui
> > Sent: Tuesday, September 18, 2012 12:44 PM
> > To: R, Durgadoss
> > Cc: lenb@kernel.org; linux-acpi@vger.kernel.org; eduardo.valentin@ti.com
> > Subject: Re: [PATCHv4 11/15] Thermal: Introduce a step_wise thermal
> > governor
> > 
> > On 二, 2012-09-18 at 11:05 +0530, Durgadoss R wrote:
> > > This patch adds a simple step_wise governor to the
> > > generic thermal layer. This algorithm throttles the
> > > cooling devices in a linear fashion. If the 'trend'
> > > is heating, it throttles by one step. And if the
> > > thermal trend is cooling it de-throttles by one step.
> > >
> > > This actually moves the throttling logic from thermal_sys.c
> > > and puts inside step_wise.c, without any change. This is
> > > always selected as the default governor.
> > >
> > > Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> > > ---
> > >  drivers/thermal/Kconfig     |    7 ++
> > >  drivers/thermal/Makefile    |    1 +
> > >  drivers/thermal/step_wise.c |  194
> > +++++++++++++++++++++++++++++++++++++++++++
> > >  3 files changed, 202 insertions(+)
> > >  create mode 100644 drivers/thermal/step_wise.c
> > >
> > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > > index 2200912..9f6a3aa 100644
> > > --- a/drivers/thermal/Kconfig
> > > +++ b/drivers/thermal/Kconfig
> > > @@ -4,6 +4,7 @@
> > >
> > >  menuconfig THERMAL
> > >  	tristate "Generic Thermal sysfs driver"
> > > +	select STEP_WISE
> > >  	help
> > >  	  Generic Thermal Sysfs driver offers a generic mechanism for
> > >  	  thermal management. Usually it's made up of one or more thermal
> > > @@ -59,3 +60,9 @@ config FAIR_SHARE
> > >  	depends on THERMAL
> > >  	help
> > >  	  Enable this to manage platform thermals using fair-share governor.
> > > +
> > > +config STEP_WISE
> > > +	bool "Step_wise thermal governor"
> > > +	depends on THERMAL
> > > +	help
> > > +	  Enable this to manage platform thermals using a simple linear
> > 
> > if we always wants CONFIG_STEP_WISE built in, why bother to export this
> > config option to users?
> > 
> > IMO, something like
> >  menuconfig THERMAL
> >   	tristate "Generic Thermal sysfs driver"
> > 	select STEP_WISE
> > 
> >  config STEP_WISE
> > 	bool
> > 	depends on THERMAL
> > 
> > is enough, SETP_WISE will always be selected.
> > 
> > further more, we even do not need a config option for this governor,
> > just "obj-y += step_wise.o" in Makefile.
> 
> Yes, Thought through this. But I thought it would be good to align this
> with the rest of the governors.
> 

we'd better follow cpufreq governor to allow users to select the default
governor, or else this configure option is needless because we never
want it to be cleared with CONFIG_THERMAL=y.

> > 
> > another question would be,
> > as this governor registration function is fs_initcall(),
> > what if a platform thermal driver is registered and gets a thermal event
> > before this governor being registered?
> 
> Wonder if this can happen with the current code, since the
> thermal_sys.c also loads with fs_initcall.
> 
you're right. this is not a problem.

thanks,
rui

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

  reply	other threads:[~2012-09-18  8:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  5:34 [PATCHv4 00/15] Thermal_framework_enhancements Durgadoss R
2012-09-18  5:34 ` [PATCHv4 01/15] Thermal: Refactor thermal.h file Durgadoss R
2012-09-18  5:34 ` [PATCHv4 02/15] Thermal: Move thermal_instance to thermal_core.h Durgadoss R
2012-09-18  5:34 ` [PATCHv4 03/15] Thermal: Add get trend, get instance API's to thermal_sys Durgadoss R
2012-09-18  5:34 ` [PATCHv4 04/15] Thermal: Add platform level information to thermal.h Durgadoss R
2012-09-21  7:12   ` Zhang Rui
2012-09-21  8:07     ` R, Durgadoss
2012-09-24  5:43       ` Zhang Rui
2012-09-18  5:34 ` [PATCHv4 05/15] Thermal: Pass zone parameters as argument to tzd_register Durgadoss R
2012-09-18  5:34 ` [PATCHv4 06/15] Thermal: Add thermal governor registration APIs Durgadoss R
2012-09-18  5:34 ` [PATCHv4 07/15] Thermal: Add a policy sysfs attribute Durgadoss R
2012-09-21  8:07   ` Zhang Rui
2012-09-21  8:09     ` R, Durgadoss
2012-09-24  5:44       ` Zhang Rui
2012-09-18  5:34 ` [PATCHv4 08/15] Thermal: Update binding logic based on platform data Durgadoss R
2012-09-18  5:35 ` [PATCHv4 09/15] Thermal: Make thermal_cdev_update as a global function Durgadoss R
2012-09-18  5:35 ` [PATCHv4 10/15] Thermal: Introduce fair_share thermal governor Durgadoss R
2012-09-18  5:35 ` [PATCHv4 11/15] Thermal: Introduce a step_wise " Durgadoss R
2012-09-18  7:13   ` Zhang Rui
2012-09-18  8:11     ` R, Durgadoss
2012-09-18  8:22       ` Zhang Rui [this message]
2012-09-18  8:32         ` R, Durgadoss
2012-09-18  5:35 ` [PATCHv4 12/15] Thermal: Add a thermal notifier for user space Durgadoss R
2012-09-18  5:35 ` [PATCHv4 13/15] Thermal: Remove throttling logic out of thermal_sys.c Durgadoss R
2012-09-18  5:35 ` [PATCHv4 14/15] Thermal: Add a notification API Durgadoss R
2012-09-18  5:35 ` [PATCHv4 15/15] Thermal: Add documentation for platform layer data Durgadoss R
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21  6:36 [PATCHv4 11/15] Thermal: Introduce a step_wise thermal governor Durgadoss R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347956520.1682.1231.camel@rui.sh.intel.com \
    --to=rui.zhang@intel.com \
    --cc=durgadoss.r@intel.com \
    --cc=eduardo.valentin@ti.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.