summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_governor.h
diff options
context:
space:
mode:
authorStratos Karafotis <stratosk@semaphore.gr>2013-02-28 16:57:32 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-01 01:11:35 +0200
commit9366d84052e7c5b2eca804c08cfcd00b490f4de2 (patch)
tree0f159a425d29f1c6be12dbf30f18a55b79ae72d2 /drivers/cpufreq/cpufreq_governor.h
parentfed573d5c91ab8f12801740cfac0567e33635b1e (diff)
downloadtalos-obmc-linux-9366d84052e7c5b2eca804c08cfcd00b490f4de2.tar.gz
talos-obmc-linux-9366d84052e7c5b2eca804c08cfcd00b490f4de2.zip
cpufreq: governors: Calculate iowait time only when necessary
Currently we always calculate the CPU iowait time and add it to idle time. If we are in ondemand and we use io_is_busy, we re-calculate iowait time and we subtract it from idle time. With this patch iowait time is calculated only when necessary avoiding the double call to get_cpu_iowait_time_us. We use a parameter in function get_cpu_idle_time to distinguish when the iowait time will be added to idle time or not, without the need of keeping the prev_io_wait. Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr> Acked-by: Viresh Kumar <viresh.kumar@linaro.,org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_governor.h')
-rw-r--r--drivers/cpufreq/cpufreq_governor.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
index c9c269f2b973..513cc8234e5e 100644
--- a/drivers/cpufreq/cpufreq_governor.h
+++ b/drivers/cpufreq/cpufreq_governor.h
@@ -148,7 +148,6 @@ struct cpu_dbs_common_info {
struct od_cpu_dbs_info_s {
struct cpu_dbs_common_info cdbs;
- u64 prev_cpu_iowait;
struct cpufreq_frequency_table *freq_table;
unsigned int freq_lo;
unsigned int freq_lo_jiffies;
@@ -256,7 +255,7 @@ static ssize_t show_sampling_rate_min_gov_pol \
return sprintf(buf, "%u\n", dbs_data->min_sampling_rate); \
}
-u64 get_cpu_idle_time(unsigned int cpu, u64 *wall);
+u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy);
void dbs_check_cpu(struct dbs_data *dbs_data, int cpu);
bool need_load_eval(struct cpu_dbs_common_info *cdbs,
unsigned int sampling_rate);
OpenPOWER on IntegriCloud