All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@gmail.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>,
	edubezval@gmail.com, kevin.wangtao@linaro.org,
	vincent.guittot@linaro.org, amit.kachhap@gmail.com,
	linux-kernel@vger.kernel.org, javi.merino@kernel.org,
	rui.zhang@intel.com, daniel.thompson@linaro.org,
	linux-pm@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver
Date: Tue, 27 Mar 2018 15:08:08 +0200	[thread overview]
Message-ID: <20180327130808.GE10639@localhost.localdomain> (raw)
In-Reply-To: <719e1d94-170c-f208-d4a2-f3e882b1e20e@linaro.org>

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 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 idle.  In
> >>>> order to reach the deepest idle state, each cooling device has the idle
> >>>> injection threads synchronized together.
> >>>>
> >>>> It has some similarity with the intel power clamp driver but it is actually
> >>>> designed to work on the ARM architecture via the DT with a mathematical proof
> >>>> with the power model which comes with the Documentation.
> >>>>
> >>>> The idle injection cycle is fixed while the running cycle is variable. That
> >>>> allows to have control on the device reactivity for the user experience. At
> >>>> the mitigation point the idle threads are unparked, they play idle the
> >>>> specified amount of time and they schedule themselves. The last thread sets
> >>>> the next idle injection deadline and when the timer expires it wakes up all
> >>>> the threads which in turn play idle again. Meanwhile the running cycle is
> >>>> changed by set_cur_state.  When the mitigation ends, the threads are parked.
> >>>> The algorithm is self adaptive, so there is no need to handle hotplugging.
> >>>
> >>> The idle injection threads are RT threads (FIFO) and I saw in
> >>> play_idle() set/clear flag PF_IDLE for it.  Will these idle injection
> >>> threads utilization be accounted into RT utilization?
> >>>
> >>> If idle injection threads utilization is accounted as RT tasks
> >>> utilization, will this impact CPUFreq governor 'schedutil' for OPP
> >>> selection?
> >>
> >> Hi Leo,
> >>
> >> The idle injection task has a very low utilization when it is not in the
> >> play_idle function, basically it wakes up, sets a timer and play_idle().
> >>
> >> Regarding the use case, the idle injection is the base brick for an
> >> combo cooling device with cpufreq + cpuidle. When the idle injection is
> >> used alone, it is because there is no cpufreq driver for the platform.
> >> If there is a cpufreq driver, then we should endup with the cpu cooling
> >> device where we have control of the OPP (and there is no idle injection
> >> threads) or the combo cooling device.
> >>
> >> Except I'm missing something, the idle injection threads won't impact
> >> the OPP selection.
> > 
> > Mmm, they actually might. schedutil selects max OPP as soon as it sees
> > an RT thread. I fear these guys might generate unwanted spikes. Maybe
> > you can filter them out?
> 
> Yes, absolutely. Leo pointed it also.
> 
> We might want to change the check at:
> 
> https://elixir.bootlin.com/linux/v4.16-rc7/source/kernel/sched/cpufreq_schedutil.c#L364
> 
> in order to ignore PF_IDLE tagged tasks.

We might yes. And also for the update_single cases, I guess.

Best,

- Juri

  reply	other threads:[~2018-03-27 13:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 15:29 [PATCH V2 0/7] CPU cooling device new strategies Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 1/7] thermal/drivers/cpu_cooling: Fixup the header and copyright Daniel Lezcano
2018-02-23  4:32   ` Viresh Kumar
2018-02-21 15:29 ` [PATCH V2 2/7] thermal/drivers/cpu_cooling: Add Software Package Data Exchange (SPDX) Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 3/7] thermal/drivers/cpu_cooling: Remove pointless field Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 4/7] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Daniel Lezcano
2018-02-23  5:24   ` Viresh Kumar
2018-02-23  9:10     ` Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 5/7] thermal/drivers/cpu_cooling: Add idle cooling device documentation Daniel Lezcano
2018-03-06 23:19   ` Pavel Machek
2018-03-07 11:42     ` Daniel Lezcano
2018-03-07 11:42       ` Daniel Lezcano
2018-03-08  8:59       ` Pavel Machek
2018-03-08 11:54         ` Daniel Thompson
2018-03-08 11:54           ` Daniel Thompson
2018-02-21 15:29 ` [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Daniel Lezcano
2018-02-23  7:34   ` Viresh Kumar
2018-02-23 11:28     ` Daniel Lezcano
2018-02-26  4:30       ` Viresh Kumar
2018-03-13 19:15         ` Daniel Lezcano
2018-04-04  8:50         ` Daniel Lezcano
2018-04-05  4:49           ` Viresh Kumar
2018-03-27  3:43       ` Leo Yan
2018-03-27 11:10         ` Daniel Lezcano
2018-02-23 15:26   ` Vincent Guittot
2018-02-24 23:01     ` Daniel Lezcano
2018-03-27  2:03   ` Leo Yan
2018-03-27 10:26     ` Daniel Lezcano
2018-03-27 12:28       ` Juri Lelli
2018-03-27 12:31         ` Daniel Lezcano
2018-03-27 13:08           ` Juri Lelli [this message]
2018-03-27  3:35   ` Leo Yan
2018-03-27 10:56     ` Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 7/7] cpuidle/drivers/cpuidle-arm: Register the cooling device Daniel Lezcano
2018-02-23  5:35   ` Viresh Kumar
2018-02-24  2:50   ` Wangtao (Kevin, Kirin)
2018-02-24 22:53     ` Daniel Lezcano
2018-02-23  5:26 ` [PATCH V2 0/7] CPU cooling device new strategies Viresh Kumar
2018-02-23  9:11   ` Daniel Lezcano
2018-03-07 17:09 ` Eduardo Valentin
2018-03-07 18:57   ` Daniel Lezcano
2018-03-08 12:03     ` Daniel Thompson
2018-03-26 14:30       ` Leo Yan
2018-03-27  9:35         ` Daniel Lezcano

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=20180327130808.GE10639@localhost.localdomain \
    --to=juri.lelli@gmail.com \
    --cc=amit.kachhap@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=daniel.thompson@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=javi.merino@kernel.org \
    --cc=kevin.wangtao@linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=vincent.guittot@linaro.org \
    --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 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.