From: Lee Daly <lee.daly@intel.com>
To: david.hunt@intel.com, liang.j.ma@intel.com
Cc: dev@dpdk.org, Lee Daly <lee.daly@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable
Date: Fri, 12 Apr 2019 16:57:27 +0100 [thread overview]
Message-ID: <1555084647-75896-1-git-send-email-lee.daly@intel.com> (raw)
Message-ID: <20190412155727.rt2qEKWSKlgSfnBdzG-OjFWrFzJoU5QtSfWJs-2kYC0@z> (raw)
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
next reply other threads:[~2019-04-12 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 15:57 Lee Daly [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1555084647-75896-1-git-send-email-lee.daly@intel.com \
--to=lee.daly@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=liang.j.ma@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).