summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2017-05-18 22:41:33 -0700
committerGeorg Veichtlbauer <georg@vware.at>2023-07-16 13:05:36 +0200
commit9539942cb065e9ec5749a89077b12fc3a0c51b0a (patch)
tree72868433ee4628a619218037aae2673b8f3fb1d8
parentb65c91c9aa14ce6e8d61d488878c0dc734508a76 (diff)
FROMLIST: cpufreq: Make iowait boost a policy option
Make iowait boost a cpufreq policy option and enable it for intel_pstate cpufreq driver. Governors like schedutil can use it to determine if boosting for tasks that wake up with p->in_iowait set is needed. Bug: 38010527 Link: https://lkml.org/lkml/2017/5/19/43 Change-Id: Icf59e75fbe731dc67abb28fb837f7bb0cd5ec6cc Signed-off-by: Joel Fernandes <joelaf@google.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c1
-rw-r--r--include/linux/cpufreq.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 15fcf2cac971..53226f33ea98 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1187,6 +1187,7 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
policy->min = cpu->pstate.min_pstate * cpu->pstate.scaling;
policy->max = cpu->pstate.turbo_pstate * cpu->pstate.scaling;
+ policy->iowait_boost_enable = true;
/* cpuinfo and default policy values */
policy->cpuinfo.min_freq = cpu->pstate.min_pstate * cpu->pstate.scaling;
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 9302d016b89f..8e9d08dfbd18 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -123,6 +123,9 @@ struct cpufreq_policy {
unsigned int up_transition_delay_us;
unsigned int down_transition_delay_us;
+ /* Boost switch for tasks with p->in_iowait set */
+ bool iowait_boost_enable;
+
/* Cached frequency lookup from cpufreq_driver_resolve_freq. */
unsigned int cached_target_freq;
int cached_resolved_idx;