From: Peter Zijlstra <peterz@infradead.org> Date: 2016-05-22 10:39:21
On Fri, May 20, 2016 at 05:53:41PM +0530, Shilpasri G Bhat wrote:
Below are the comparisons by disabling watchdog.
Both schedutil and ondemand have a similar ramp-down trend. And in both the
cases I can see that frequency of the cpu is not reduced in deterministic
fashion. In a observation window of 30 seconds after running a workload I can
see that the frequency is not ramped down on some cpus in the system and are
idling at max frequency.
So does it actually matter what the frequency is when you idle? Isn't
the whole thing clock gated anyway?
Because this seems to generate contradictory requirements, on the one
hand we want to stay idle as long as possible while on the other hand
you seem to want to clock down while idle, which requires not being
idle.
If it matters; should not your idle state muck explicitly set/restore
frequency?
From: Steve Muckle <hidden> Date: 2016-05-22 20:42:59
On Sun, May 22, 2016 at 12:39:12PM +0200, Peter Zijlstra wrote:
On Fri, May 20, 2016 at 05:53:41PM +0530, Shilpasri G Bhat wrote:
quoted
Below are the comparisons by disabling watchdog.
Both schedutil and ondemand have a similar ramp-down trend. And in both the
cases I can see that frequency of the cpu is not reduced in deterministic
fashion. In a observation window of 30 seconds after running a workload I can
see that the frequency is not ramped down on some cpus in the system and are
idling at max frequency.
So does it actually matter what the frequency is when you idle? Isn't
the whole thing clock gated anyway?
Because this seems to generate contradictory requirements, on the one
hand we want to stay idle as long as possible while on the other hand
you seem to want to clock down while idle, which requires not being
idle.
If it matters; should not your idle state muck explicitly set/restore
frequency?
AFAIK this is very platform dependent. Some will waste more power than
others when a CPU idles above fmin due to things like resource (bus
bandwidth, shared cache freq etc) voting.
It is also true that there is power spent going to fmin (and then
perhaps restoring the frequency when idle ends) which will be in part a
function of how slow the frequency change operation is on that platform.
I think Daniel Lezcano (added) was exploring the idea of having cpuidle
drivers take the expected idle duration and potentially communicate to
cpufreq to reduce the frequency depending on a platform-specific
cost/benefit analysis.
From: Lorenzo Pieralisi <hidden> Date: 2016-05-23 08:59:51
On Sun, May 22, 2016 at 01:42:52PM -0700, Steve Muckle wrote:
On Sun, May 22, 2016 at 12:39:12PM +0200, Peter Zijlstra wrote:
quoted
On Fri, May 20, 2016 at 05:53:41PM +0530, Shilpasri G Bhat wrote:
quoted
Below are the comparisons by disabling watchdog.
Both schedutil and ondemand have a similar ramp-down trend. And in both the
cases I can see that frequency of the cpu is not reduced in deterministic
fashion. In a observation window of 30 seconds after running a workload I can
see that the frequency is not ramped down on some cpus in the system and are
idling at max frequency.
So does it actually matter what the frequency is when you idle? Isn't
the whole thing clock gated anyway?
Because this seems to generate contradictory requirements, on the one
hand we want to stay idle as long as possible while on the other hand
you seem to want to clock down while idle, which requires not being
idle.
If it matters; should not your idle state muck explicitly set/restore
frequency?
AFAIK this is very platform dependent. Some will waste more power than
others when a CPU idles above fmin due to things like resource (bus
bandwidth, shared cache freq etc) voting.
It is also related to static leakage power that depends on the operating
voltage (ie higher operating frequencies require higher voltage) so in a
way scaling frequency before going idle may not be effective if voltage
does not scale too in turn.
Lorenzo
From: Peter Zijlstra <peterz@infradead.org> Date: 2016-05-23 09:24:34
On Sun, May 22, 2016 at 01:42:52PM -0700, Steve Muckle wrote:
quoted
So does it actually matter what the frequency is when you idle? Isn't
the whole thing clock gated anyway?
Because this seems to generate contradictory requirements, on the one
hand we want to stay idle as long as possible while on the other hand
you seem to want to clock down while idle, which requires not being
idle.
If it matters; should not your idle state muck explicitly set/restore
frequency?
AFAIK this is very platform dependent. Some will waste more power than
others when a CPU idles above fmin due to things like resource (bus
bandwidth, shared cache freq etc) voting.
Oh agreed, completely platform dependent. 'Luckily' all this cpuidle is
already very platform dependent.
It is also true that there is power spent going to fmin (and then
perhaps restoring the frequency when idle ends) which will be in part a
function of how slow the frequency change operation is on that platform.
Agreed.
I think Daniel Lezcano (added) was exploring the idea of having cpuidle
drivers take the expected idle duration and potentially communicate to
cpufreq to reduce the frequency depending on a platform-specific
cost/benefit analysis.
Right; that's along the lines I was thinking. If the idle guestimate and
the idle QoS both allow (ie. it wins on power and doesn't violate
wake-up latency) muck with DVSF on the idle path.
From: Peter Zijlstra <peterz@infradead.org> Date: 2016-05-23 09:25:08
On Mon, May 23, 2016 at 10:00:04AM +0100, Lorenzo Pieralisi wrote:
It is also related to static leakage power that depends on the operating
voltage (ie higher operating frequencies require higher voltage) so in a
way scaling frequency before going idle may not be effective if voltage
does not scale too in turn.
Sure, but the platform drivers 'know' all this and can make the right
decision.