[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200526151619.8779-3-benjamin.gaignard@st.com>
Date: Tue, 26 May 2020 17:16:18 +0200
From: Benjamin Gaignard <benjamin.gaignard@...com>
To: <rjw@...ysocki.net>, <viresh.kumar@...aro.org>,
<hugues.fruchet@...com>, <mchehab@...nel.org>,
<mcoquelin.stm32@...il.com>, <alexandre.torgue@...com>,
<pavel@....cz>, <len.brown@...el.com>,
<valentin.schneider@....com>, <vincent.guittot@...aro.org>
CC: <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-media@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
Benjamin Gaignard <benjamin.gaignard@...com>
Subject: [RFC 2/3] cpufreq: governor: Use minimum load QoS
Make sure that the returned load is above the system-wide minimum
load QoS.
Devices could set this specific QoS to inform governors about their
need in terms of CPU load when computing it from idle time isn't accurate.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...com>
---
drivers/cpufreq/cpufreq_governor.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index f99ae45efaea..1494e5e4c788 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -118,6 +118,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
unsigned int ignore_nice = dbs_data->ignore_nice_load;
unsigned int max_load = 0, idle_periods = UINT_MAX;
unsigned int sampling_rate, io_busy, j;
+ unsigned int qos_min_load;
/*
* Sometimes governors may use an additional multiplier to increase
@@ -225,6 +226,10 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
policy_dbs->idle_periods = idle_periods;
+ qos_min_load = cpufreq_minload_qos_limit();
+ if (qos_min_load > max_load)
+ max_load = qos_min_load;
+
return max_load;
}
EXPORT_SYMBOL_GPL(dbs_update);
--
2.15.0
Powered by blists - more mailing lists