From: Andreas Herrmann <aherrmann@suse.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Stratos Karafotis <stratosk@semaphore.gr>,
Thomas Renninger <trenn@suse.com>
Subject: Re: [PATCH 1/1] cpufreq: pcc-cpufreq: Re-introduce deadband effect to reduce number of frequency changes
Date: Wed, 14 Sep 2016 16:56:43 +0200 [thread overview]
Message-ID: <20160914145643.GA19982@suselix.suse.de> (raw)
In-Reply-To: <20160907050201.GK27345@vireshk-i7>
On Wed, Sep 07, 2016 at 10:32:01AM +0530, Viresh Kumar wrote:
> On 01-09-16, 15:21, Andreas Herrmann wrote:
---8<---
> > I started with the value return as "nominal latency" for PCC. This
> > was 300000 ns on the test system and made things worse. I've tested
> > other values as well unitl I've found a local optimium at 45000ns but
> > performance was lower in comparison to when I've applied my hack.
>
> Can you try to use kernel tracer (ftrace) and see how the frequencies
> are getting changed and at what frequency.
Below is some trace data. I hope it is of some help.
(A) - sampling 10s period when system is idle
(B) - sampling 10s period when system partially loaded (kernel
compilation using 2 jobs)
(1) 4.8-rc5
(2) 4.8-rc5 with my patch (reintro of deadband effect within
pcc-cpufreq)
(3) 4.8-rc5 with reversal of 6393d6a102 (cpufreq: ondemand: Eliminate
the deadband effect)
Let me know whether you are looking for other trace data wrt this
issue.
Thanks,
Andreas
---
(A)-(1)
# Total Lost Samples: 0
# Samples: 41 of event 'power:cpu_frequency'
# Event count (approx.): 41
# Overhead Command Shared Object Symbol
# ........ ............ ................ .............................
39.02% kworker/14:1 [kernel.vmlinux] [k] cpufreq_notify_transition
29.27% kworker/0:0 [kernel.vmlinux] [k] cpufreq_notify_transition
19.51% kworker/10:1 [kernel.vmlinux] [k] cpufreq_notify_transition
7.32% kworker/5:2 [kernel.vmlinux] [k] cpufreq_notify_transition
2.44% kworker/23:2 [kernel.vmlinux] [k] cpufreq_notify_transition
2.44% kworker/40:1 [kernel.vmlinux] [k] cpufreq_notify_transition
(A)-(2)
# Total Lost Samples: 0
# Samples: 6 of event 'power:cpu_frequency'
# Event count (approx.): 6
# Overhead Command Shared Object Symbol
# ........ ............ ................ .............................
33.33% kworker/1:2 [kernel.vmlinux] [k] cpufreq_notify_transition
16.67% kworker/16:1 [kernel.vmlinux] [k] cpufreq_notify_transition
16.67% kworker/22:1 [kernel.vmlinux] [k] cpufreq_notify_transition
16.67% kworker/26:1 [kernel.vmlinux] [k] cpufreq_notify_transition
16.67% kworker/33:1 [kernel.vmlinux] [k] cpufreq_notify_transition
(A)-(3)
# Total Lost Samples: 0
# Samples: 7 of event 'power:cpu_frequency'
# Event count (approx.): 7
# Overhead Command Shared Object Symbol
# ........ ............ ................ .............................
28.57% kworker/58:1 [kernel.vmlinux] [k] cpufreq_notify_transition
14.29% kworker/19:2 [kernel.vmlinux] [k] cpufreq_notify_transition
14.29% kworker/20:2 [kernel.vmlinux] [k] cpufreq_notify_transition
14.29% kworker/22:2 [kernel.vmlinux] [k] cpufreq_notify_transition
14.29% kworker/23:1 [kernel.vmlinux] [k] cpufreq_notify_transition
14.29% kworker/35:1 [kernel.vmlinux] [k] cpufreq_notify_transition
---
(B)-(1)
# Total Lost Samples: 0
# Samples: 2K of event 'power:cpu_frequency'
# Event count (approx.): 2382
# Overhead Command Shared Object Symbol
# ........ ............ ................ .............................
5.75% kworker/0:0 [kernel.vmlinux] [k] cpufreq_notify_transition
4.16% kworker/12:2 [kernel.vmlinux] [k] cpufreq_notify_transition
3.11% kworker/17:1 [kernel.vmlinux] [k] cpufreq_notify_transition
2.94% kworker/2:1 [kernel.vmlinux] [k] cpufreq_notify_transition
2.73% kworker/19:1 [kernel.vmlinux] [k] cpufreq_notify_transition
...
(B)-(2)
# Total Lost Samples: 0
# Samples: 320 of event 'power:cpu_frequency'
# Event count (approx.): 320
# Overhead Command Shared Object Symbol
# ........ ............ ................ .............................
4.69% kworker/56:1 [kernel.vmlinux] [k] cpufreq_notify_transition
4.06% kworker/12:1 [kernel.vmlinux] [k] cpufreq_notify_transition
4.06% kworker/28:1 [kernel.vmlinux] [k] cpufreq_notify_transition
4.06% kworker/6:2 [kernel.vmlinux] [k] cpufreq_notify_transition
3.75% kworker/32:2 [kernel.vmlinux] [k] cpufreq_notify_transition
...
(B)-(3)
# Total Lost Samples: 0
# Samples: 333 of event 'power:cpu_frequency'
# Event count (approx.): 333
# Overhead Command Shared Object Symbol
# ........ ............ ................ .............................
4.80% kworker/51:1 [kernel.vmlinux] [k] cpufreq_notify_transition
4.50% kworker/39:1 [kernel.vmlinux] [k] cpufreq_notify_transition
4.20% kworker/47:1 [kernel.vmlinux] [k] cpufreq_notify_transition
3.90% kworker/59:1 [kernel.vmlinux] [k] cpufreq_notify_transition
3.90% kworker/7:2 [kernel.vmlinux] [k] cpufreq_notify_transition
...
---
With (1) pcc-cpufreq tries to set pretty much every frequency even if
the system is idle, e.g. here is the start of (perf script output)
from (A)-(1):
kworker/5:2 904 [005] 255.778343: power:cpu_frequency: state=1216000 cpu_id=5
kworker/5:2 904 [005] 255.794382: power:cpu_frequency: state=1264000 cpu_id=5
kworker/5:2 904 [005] 256.102400: power:cpu_frequency: state=1200000 cpu_id=5
kworker/10:1 171 [010] 258.010362: power:cpu_frequency: state=2224000 cpu_id=10
kworker/10:1 171 [010] 258.026366: power:cpu_frequency: state=1264000 cpu_id=10
kworker/10:1 171 [010] 258.594514: power:cpu_frequency: state=1200000 cpu_id=10
kworker/10:1 171 [010] 258.618417: power:cpu_frequency: state=1232000 cpu_id=10
kworker/10:1 171 [010] 258.634409: power:cpu_frequency: state=1264000 cpu_id=10
kworker/10:1 171 [010] 258.674467: power:cpu_frequency: state=1200000 cpu_id=10
kworker/10:1 171 [010] 258.730486: power:cpu_frequency: state=1216000 cpu_id=10
kworker/40:1 388 [040] 258.730999: power:cpu_frequency: state=1200000 cpu_id=40
kworker/23:2 775 [023] 258.731504: power:cpu_frequency: state=1200000 cpu_id=23
kworker/14:1 178 [014] 258.732013: power:cpu_frequency: state=1216000 cpu_id=14
kworker/10:1 171 [010] 258.906434: power:cpu_frequency: state=1200000 cpu_id=10
kworker/14:1 178 [014] 258.970500: power:cpu_frequency: state=1200000 cpu_id=14
kworker/14:1 178 [014] 258.998440: power:cpu_frequency: state=1232000 cpu_id=14
kworker/14:1 178 [014] 259.034490: power:cpu_frequency: state=1200000 cpu_id=14
kworker/14:1 178 [014] 259.095089: power:cpu_frequency: state=1216000 cpu_id=14
kworker/14:1 178 [014] 259.270470: power:cpu_frequency: state=1200000 cpu_id=14
...
next prev parent reply other threads:[~2016-09-14 14:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 12:18 [PATCH 0/1] cpufreq: pcc-cpufreq: Re-introduce deadband effect to reduce number of frequency changes Andreas Herrmann
2016-08-19 12:21 ` [PATCH 1/1] " Andreas Herrmann
2016-08-29 6:01 ` Viresh Kumar
2016-09-01 13:21 ` Andreas Herrmann
2016-09-07 5:02 ` Viresh Kumar
2016-09-13 10:53 ` Andreas Herrmann
2016-09-14 14:56 ` Andreas Herrmann [this message]
2016-10-05 5:17 ` Viresh Kumar
2016-10-11 6:28 ` Andreas Herrmann
2016-09-16 9:47 ` Andreas Herrmann
2016-09-16 18:48 ` Stratos Karafotis
[not found] ` <CADmjqpNE9f7fzQjWsHKB4wEjLq-4ZvQpaC314OcLdQ-i_TAABg@mail.gmail.com>
2016-09-19 16:16 ` Andreas Herrmann
2016-09-19 19:39 ` Stratos Karafotis
2016-09-22 17:54 ` Andreas Herrmann
2016-10-05 5:21 ` Viresh Kumar
2016-08-19 12:40 ` [PATCH 0/1] " Andreas Herrmann
2016-09-23 16:56 ` [PATCH v2 0/2] " Andreas Herrmann
2016-09-23 17:02 ` [PATCH v2 1/2] cpufreq/ondemand: Introduce op to customize mapping of load to frequency Andreas Herrmann
2016-10-05 4:01 ` Viresh Kumar
2016-10-11 6:30 ` Andreas Herrmann
2016-09-23 17:07 ` [PATCH v2 2/2] cpufreq/pcc-cpufreq: Make use of map_load_to_freq op Andreas Herrmann
2016-09-26 9:05 ` [PATCH v3 " Andreas Herrmann
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=20160914145643.GA19982@suselix.suse.de \
--to=aherrmann@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stratosk@semaphore.gr \
--cc=trenn@suse.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;
as well as URLs for NNTP newsgroup(s).