On demand cpufreq governor causes large amounts of jitter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Fix Released
|
High
|
Adam Conrad | ||
Trusty |
Fix Released
|
High
|
Adam Conrad | ||
Vivid |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
== Comment: #0 - Anton Blanchard <email address hidden> - 2015-07-16 22:22:09 ==
We are seeing large amounts of jitter caused by od_dbs_timer(). We should slow down the rate of updates and or turn this into a timer. Having a workqueue execute so often is very noticeable.
# echo 1 > /sys/kernel/
(wait a while)
# cat /sys/kernel/
== Comment: #1 - Shilpasri G. Bhat <email address hidden> - 2015-07-22 19:42:38 ==
Hi Anton,
We can set the governor's tunable 'sampling_
I am currently running benchmarks to find out the optimal value for this tunable and will post them soon.
Thanks and Regards,
Shilpa
== Comment: #2 - Anton Blanchard <email address hidden> - 2015-07-31 03:44:49 ==
FYI We are also seeing high levels of CPU consumed by this on a LAMP workload:
2.54% kworker/0:0 [kernel.kallsyms] [k] osq_lock
|
|
| __mutex_
| mutex_lock
| |
| |--80.08%-- od_dbs_timer
2.5% of total CPU time spent in the od_dbs_timer mutex.
== Comment: #3 - Anton Blanchard <email address hidden> - 2015-07-31 06:00:45 ==
Hitting this on a customer setup, raising priority
== Comment: #4 - Shilpasri G. Bhat <email address hidden> - 2015-08-03 06:47:40 ==
I used `perf top` and `perf record` to observe the overhead caused by 'osq_lock'.
Both with ebizzy and SPECPower's ssjb workload I am able to see an overhead of 0.03% caused by 'osq_lock' with default governor settings.
With sampling_
So this might not be a good data point to showcase, but by reducing the od_dbs_timer interrupts we are guaranteed to decrease the overhead caused by 'osq_lock'.
== Comment: #5 - VAIDYANATHAN SRINIVASAN <email address hidden> - 2015-08-03 09:09:09 ==
Hi Anton,
Thanks for opening the bz to track and fix this issue. Shilpa is trying different workarounds. Here is our plan:
(1) Use sampling_
(2) Redesign cpufreq subsystem on powerpc similar to intel pstate driver so that we can program timers and cancel them dynamically based on different utilization points. Target Ubuntu 16.04 and then backport to 14.04.x and other distros.
(3) Enhance design for (2) buy estimating core level utilization without running timers in each thread and then decide the target PState
(4) Explore hardware assist so that we can avoid per-core estimation in software but still be able to set per-core PState. We need to take an interrupt or work-queue only to change PState and not really for estimation of load. Hence steady state load will experience zero jitter from cpufreq.
--Vaidy
== Comment: #7 - Shilpasri G. Bhat <email address hidden> - 2015-08-04 07:49:23 ==
Workaround using ondemand tunable 'sampling_
File: /etc/init.
if [ "$GOVERNOR" = "ondemand" ]; then
fi
Setting the value of 100 to sampling_
Related branches
tags: |
added: targetmilestone-inin1510 removed: targetmilestone-inin1504 |
Changed in sysvinit (Ubuntu Trusty): | |
assignee: | nobody → Adam Conrad (adconrad) |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: targetmilestone-inin1404 |
tags: | removed: targetmilestone-inin1404 |
Changed in sysvinit (Ubuntu Trusty): | |
milestone: | none → ubuntu-14.04.4 |
summary: |
- On demand cpufreq govneror causes large amounts of jitter + On demand cpufreq governor causes large amounts of jitter |
tags: |
added: verification-done removed: verification-needed |
Default Comment by Bridge