DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hunt, David" <david.hunt@intel.com>
To: Lee Daly <lee.daly@intel.com>, liang.j.ma@intel.com
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable
Date: Mon, 15 Apr 2019 10:21:43 +0100	[thread overview]
Message-ID: <0e4ce484-1ae1-e759-9e81-e6328e0911bc@intel.com> (raw)
Message-ID: <20190415092143.JSuHX8bve9fUT4yeJvozGrIbroeWugi7ziFTXwcCSZI@z> (raw)
In-Reply-To: <1555084647-75896-1-git-send-email-lee.daly@intel.com>


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>



  parent reply	other threads:[~2019-04-15  9:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 15:57 Lee Daly
2019-04-12 15:57 ` Lee Daly
2019-04-15  9:21 ` Hunt, David [this message]
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=0e4ce484-1ae1-e759-9e81-e6328e0911bc@intel.com \
    --to=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=lee.daly@intel.com \
    --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).