mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: Jean Wangtao <jean.wangtao@linaro.org>
Cc: edubezval@gmail.com, javi.merino@kernel.org,
	viresh kumar <viresh.kumar@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Tao Wang <kevin.wangtao@hisilicon.com>,
	"Sunzhaosheng Sun(Zhaosheng)" <sunzhaosheng@hisilicon.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Amit Kachhap <amit.kachhap@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com
Subject: Re: [PATCH RFC 1/2] thermal/cpu idle cooling: Introduce cpu idle cooling driver
Date: Thu, 8 Jun 2017 15:42:19 +0200	[thread overview]
Message-ID: <CAKfTPtCVsDkjTx5u9ecDj0P2zJ2w3LVRDGiGL2XMT4eES2tVpg@mail.gmail.com> (raw)
In-Reply-To: <CAMBp1jNWrosu4vaFwqy4cKs69r3-zX_b06-09eitCcfteHBG2w@mail.gmail.com>

On 8 June 2017 at 14:59, Jean Wangtao <jean.wangtao@linaro.org> wrote:
>
> Hi Vincent,
>
> 2017年6月8日 下午3:19,"Vincent Guittot" <vincent.guittot@linaro.org>写道:
>
> Hi Kevin,
>
> On 5 June 2017 at 11:07, Tao Wang <kevin.wangtao@hisilicon.com> wrote:
>> cpu idle cooling driver performs synchronized idle injection across
>> all cpu in same cluster, offers a new method to cooling down cpu,
>> that is similar to intel_power_clamp driver, but is basically
>> designed for ARM platform.
>> Each cluster has its own idle cooling device, each core has its own
>> idle injection thread, idle injection thread use play_idle to enter
>> idle. In order to reach deepest idle state, all cores are aligned by
>> jiffies. the injected idle ratio can be controlled through cooling
>> device interface.
>>
>> Signed-off-by: Tao Wang <kevin.wangtao@hisilicon.com>
>> ---
>>  drivers/thermal/Kconfig            |   13 +
>>  drivers/thermal/Makefile           |    3 +
>>  drivers/thermal/cpu_idle_cooling.c |  648
>> ++++++++++++++++++++++++++++++++++++
>>  3 files changed, 664 insertions(+)
>>  create mode 100644 drivers/thermal/cpu_idle_cooling.c
>>
>> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
>> index b5b5fac..f78e85c 100644
>> --- a/drivers/thermal/Kconfig
>> +++ b/drivers/thermal/Kconfig
>> @@ -154,6 +154,19 @@ config CPU_THERMAL
>>
>>           If you want this support, you should say Y here.
>>
>> +config CPU_IDLE_THERMAL
>> +       tristate "generic cpu idle cooling support"
>> +       depends on CPU_FREQ
>
> Does CPU_IDLE_THERMAL really depend on CPU_FREQ ?
>
>
> because I use a interface of cpufreq to get cpu idle time and current wall
> time, that cause the dependency

IMO, you should better use directly get_cpu_idle_time_us and remove
your dependency with cpufreq
Furthermore, get_cpu_idle_time from cpufreq may consider iowait as
busy time which could make sense for cpufreq but not really for idle
injection


>
> This dependency should be put for CPU_THERMAL_COMBO in the patch 2
>
>
> CPU_THERMAL_COMBO depend on CPU_THERMAL and CPU_IDLE_THERMAL, but the code
> of patch 2 have no direct relationship with cpufreq, so I didn't add the
> dependency

yes you're right, CPU_THERMAL_COMBO depends already on CPUFREQ

>
>
>> +       help
>> +         This implements the generic cpu cooling mechanism through idle
>> +         injection.
>> +
>> +         This will throttle cpu by injecting specified idle time in
>> +         a fixed cycle. All cpu in same cluster will enter idle
>> synchronously
>> +         to reach deepest idle state when injecting idle.
>> +
>> +         If you want this support, you should say Y here.
>> +
>>  config CLOCK_THERMAL
>>         bool "Generic clock cooling support"
>>         depends on COMMON_CLK
>> diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
>> index 094d703..a4db66e 100644
>> --- a/drivers/thermal/Makefile
>> +++ b/drivers/thermal/Makefile
>> @@ -26,6 +26,9 @@ thermal_sys-$(CONFIG_CLOCK_THERMAL)   += clock_cooling.o
>>  # devfreq cooling
>>  thermal_sys-$(CONFIG_DEVFREQ_THERMAL) += devfreq_cooling.o
>>
>> +# cpu idle cooling
>> +obj-$(CONFIG_CPU_IDLE_THERMAL) += cpu_idle_cooling.o
>> +
>>  # platform thermal drivers
>>  obj-y                          += broadcom/
>>  obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM)     += qcom-spmi-temp-alarm.o
>> diff --git a/drivers/thermal/cpu_idle_cooling.c
>> b/drivers/thermal/cpu_idle_cooling.c
>> new file mode 100644
>> index 0000000..89a15c5
>> --- /dev/null
>
> [snip]
>
>

      parent reply	other threads:[~2017-06-08 13:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  9:07 Tao Wang
2017-06-05  9:07 ` [PATCH RFC 2/2] thermal/cpu idle cooling: cpu idle cooling cooperate with cpu cooling Tao Wang
2017-06-06  3:41 ` [PATCH RFC 1/2] thermal/cpu idle cooling: Introduce cpu idle cooling driver Viresh Kumar
2017-06-07 21:50   ` Daniel Lezcano
2017-06-07 21:59     ` Rafael J. Wysocki
2017-06-08  7:52       ` Daniel Lezcano
2017-06-08 12:04   ` Daniel Lezcano
2017-06-09  8:20   ` Daniel Lezcano
     [not found]     ` <CAMBp1jM4KV5yj2=p=JBSfnw9u1D6qqtru49Rqp_8d3ePkHcE5Q@mail.gmail.com>
2017-06-14 12:55       ` Daniel Lezcano
2017-06-14 15:39         ` Vincent Guittot
2017-06-15 15:55         ` Jean Wangtao
2017-06-08  7:19 ` Vincent Guittot
     [not found]   ` <CAMBp1jNWrosu4vaFwqy4cKs69r3-zX_b06-09eitCcfteHBG2w@mail.gmail.com>
2017-06-08 13:42     ` Vincent Guittot [this message]

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=CAKfTPtCVsDkjTx5u9ecDj0P2zJ2w3LVRDGiGL2XMT4eES2tVpg@mail.gmail.com \
    --to=vincent.guittot@linaro.org \
    --cc=amit.kachhap@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=javi.merino@kernel.org \
    --cc=jean.wangtao@linaro.org \
    --cc=kevin.wangtao@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sunzhaosheng@hisilicon.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®