* [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable
@ 2019-04-12 15:57 Lee Daly
2019-04-15 9:21 ` Hunt, David
2019-04-15 16:11 ` [dpdk-stable] " Liang, Ma
0 siblings, 2 replies; 6+ 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] 6+ messages in thread
* Re: [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable
2019-04-12 15:57 [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable Lee Daly
@ 2019-04-15 9:21 ` Hunt, David
2019-04-22 22:12 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-04-15 16:11 ` [dpdk-stable] " Liang, Ma
1 sibling, 1 reply; 6+ messages in thread
From: Hunt, David @ 2019-04-15 9:21 UTC (permalink / raw)
To: Lee Daly, liang.j.ma; +Cc: dev, stable
On 12/4/2019 4:57 PM, Lee Daly wrote:
> 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;
> }
>
Acked-by: David Hunt <david.hunt@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable
2019-04-15 9:21 ` Hunt, David
@ 2019-04-22 22:12 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2019-04-22 22:12 UTC (permalink / raw)
To: Lee Daly; +Cc: dev, Hunt, David, liang.j.ma, stable
15/04/2019 11:21, Hunt, David:
> On 12/4/2019 4:57 PM, Lee Daly wrote:
> > 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>
> > ---
> > -
> > + 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;
> > }
>
> Acked-by: David Hunt <david.hunt@intel.com>
Applied without extra parentheses and with blank line restored.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable
2019-04-12 15:57 [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable Lee Daly
2019-04-15 9:21 ` Hunt, David
@ 2019-04-15 16:11 ` Liang, Ma
2019-04-15 16:36 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
1 sibling, 1 reply; 6+ messages in thread
From: Liang, Ma @ 2019-04-15 16:11 UTC (permalink / raw)
To: Lee Daly; +Cc: david.hunt, dev, stable
Acked-by: Liang Ma <liang.j.ma@intel.com>
On 12 Apr 16:57, Lee Daly wrote:
> 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] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable
2019-04-15 16:11 ` [dpdk-stable] " Liang, Ma
@ 2019-04-15 16:36 ` Stephen Hemminger
2019-04-16 9:25 ` Bruce Richardson
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2019-04-15 16:36 UTC (permalink / raw)
To: Liang, Ma; +Cc: Lee Daly, david.hunt, dev, stable
On Mon, 15 Apr 2019 17:11:10 +0100
"Liang, Ma" <liang.j.ma@intel.com> wrote:
> > pi->turbo_enable = 0;
> >
> > -
> > + if ((pi->turbo_available) && (pi->curr_idx <= 1)) {
You (don't) need (so many) parenthesis.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable
2019-04-15 16:36 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
@ 2019-04-16 9:25 ` Bruce Richardson
0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2019-04-16 9:25 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Liang, Ma, Lee Daly, david.hunt, dev, stable
On Mon, Apr 15, 2019 at 09:36:40AM -0700, Stephen Hemminger wrote:
> On Mon, 15 Apr 2019 17:11:10 +0100
> "Liang, Ma" <liang.j.ma@intel.com> wrote:
>
> > > pi->turbo_enable = 0;
> > >
> > > -
> > > + if ((pi->turbo_available) && (pi->curr_idx <= 1)) {
>
> You (don't) need (so many) parenthesis.
True (but it doesn't hurt (either)) :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-04-22 22:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 15:57 [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable Lee Daly
2019-04-15 9:21 ` Hunt, David
2019-04-22 22:12 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-04-15 16:11 ` [dpdk-stable] " Liang, Ma
2019-04-15 16:36 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
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).