All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Ma" <liang.j.ma@intel.com>
To: Lee Daly <lee.daly@intel.com>
Cc: david.hunt@intel.com, 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 17:11:10 +0100	[thread overview]
Message-ID: <20190415161110.GA17469@sivswdev09.ir.intel.com> (raw)
In-Reply-To: <1555084647-75896-1-git-send-email-lee.daly@intel.com>


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
> 

  parent reply	other threads:[~2019-04-15 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 15:57 [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable Lee Daly
2019-04-15  9:21 ` Hunt, David
2019-04-22 22:12   ` Thomas Monjalon
2019-04-15 16:11 ` Liang, Ma [this message]
2019-04-15 16:36   ` Stephen Hemminger
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=20190415161110.GA17469@sivswdev09.ir.intel.com \
    --to=liang.j.ma@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=lee.daly@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.