diff options
| author | Rohit Gupta <rohgup@codeaurora.org> | 2014-11-20 19:21:36 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:22:26 -0700 |
| commit | d1e73b29199f806ece2c5bb5ea18b1c231915ed6 (patch) | |
| tree | 614d5741f9a927875da1c2bf34ac680df7c9b5cf /include | |
| parent | fd9840587441a81e610cfac2afa4f864221c3cd4 (diff) | |
soc: qcom: msm_perf: Add detection for heavy IO workloads
Some workloads spend a lot of time in IO activity and need higher
performance from system resources (for eg. CPU/DDR frequencies)to
complete with decent performance. Unfortunately cpufreq governors and
other system resources crucial for IO are tuned for general usecases
and hence might be slower to react to such demanding IO workloads.
This patch adds functionality to detect IO workloads and then send
hints to userspace of the detected activity so that userspace can
take necessary tuning action to prepare the system for such activity.
IO activity is tracked every interactive governor timer boundary and
if the percentage of iowait time in each cycle exceeds certain
threshold continuously for certain number of cycles then heavy IO
activity is detected.
Change-Id: I73859517cb436e50340ef14739183e61fc62f90f
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/trace/events/power.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 0af804eb97c7..fc3084240bf2 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -794,6 +794,39 @@ DEFINE_EVENT(kpm_module, reevaluate_hotplug, TP_PROTO(unsigned int managed_cpus, unsigned int max_cpus), TP_ARGS(managed_cpus, max_cpus) ); + +DECLARE_EVENT_CLASS(kpm_module2, + + TP_PROTO(unsigned int cpu, unsigned int cycles, unsigned int io_busy, + u64 iowait), + + TP_ARGS(cpu, cycles, io_busy, iowait), + + TP_STRUCT__entry( + __field(u32, cpu) + __field(u32, cycles) + __field(u32, io_busy) + __field(u64, iowait) + ), + + TP_fast_assign( + __entry->cpu = cpu; + __entry->cycles = cycles; + __entry->io_busy = io_busy; + __entry->iowait = iowait; + ), + + TP_printk("CPU:%u cycles=%u io_busy=%u iowait=%lu", + (unsigned int)__entry->cpu, (unsigned int)__entry->cycles, + (unsigned int)__entry->io_busy, (unsigned long)__entry->iowait) +); + +DEFINE_EVENT(kpm_module2, track_iowait, + TP_PROTO(unsigned int cpu, unsigned int cycles, unsigned int io_busy, + u64 iowait), + TP_ARGS(cpu, cycles, io_busy, iowait) +); + #endif /* _TRACE_POWER_H */ /* This part must be outside protection */ |
