DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable
@ 2019-04-12 15:57 Lee Daly
  2019-04-12 15:57 ` Lee Daly
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Lee Daly @ 2019-04-12 15:57 UTC (permalink / raw)
  To: david.hunt, liang.j.ma; +Cc: dev, Lee Daly, stable

This patch will ensure the correct max frequency of a core is set in
the lcore_power_info struct when disabling turbo, while using the
intel pstate driver.

Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility")
Cc: liang.j.ma@intel.com
Cc: stable@dpdk.org

Signed-off-by: Lee Daly <lee.daly@intel.com>
---
 lib/librte_power/power_pstate_cpufreq.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c
index 336c13869..d2ac75123 100644
--- a/lib/librte_power/power_pstate_cpufreq.c
+++ b/lib/librte_power/power_pstate_cpufreq.c
@@ -810,7 +810,15 @@ power_pstate_disable_turbo(unsigned int lcore_id)
 
 	pi->turbo_enable = 0;
 
-
+	if ((pi->turbo_available) && (pi->curr_idx <= 1)) {
+		/* Try to set freq to max by default coming out of turbo */
+		if (power_pstate_cpufreq_freq_max(lcore_id) < 0) {
+			RTE_LOG(ERR, POWER,
+				"Failed to set frequency of lcore %u to max\n",
+				lcore_id);
+			return -1;
+		}
+	}
 	return 0;
 }
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-04-22 22:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 15:57 [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable Lee Daly
2019-04-12 15:57 ` Lee Daly
2019-04-15  9:21 ` Hunt, David
2019-04-15  9:21   ` Hunt, David
2019-04-22 22:12   ` Thomas Monjalon
2019-04-22 22:12     ` Thomas Monjalon
2019-04-15 16:11 ` Liang, Ma
2019-04-15 16:11   ` Liang, Ma
2019-04-15 16:36   ` Stephen Hemminger
2019-04-15 16:36     ` Stephen Hemminger
2019-04-16  9:25     ` Bruce Richardson
2019-04-16  9:25       ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).