From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 97F2D1B120; Mon, 15 Apr 2019 11:21:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 02:21:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,353,1549958400"; d="scan'208";a="161643942" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.210.157]) ([10.237.210.157]) by fmsmga002.fm.intel.com with ESMTP; 15 Apr 2019 02:21:44 -0700 To: Lee Daly , liang.j.ma@intel.com Cc: dev@dpdk.org, stable@dpdk.org References: <1555084647-75896-1-git-send-email-lee.daly@intel.com> From: "Hunt, David" Message-ID: <0e4ce484-1ae1-e759-9e81-e6328e0911bc@intel.com> Date: Mon, 15 Apr 2019 10:21:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1555084647-75896-1-git-send-email-lee.daly@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 09:21:47 -0000 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 > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 725ABA00E6 for ; Mon, 15 Apr 2019 11:21:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA5BF1B131; Mon, 15 Apr 2019 11:21:48 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 97F2D1B120; Mon, 15 Apr 2019 11:21:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 02:21:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,353,1549958400"; d="scan'208";a="161643942" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.210.157]) ([10.237.210.157]) by fmsmga002.fm.intel.com with ESMTP; 15 Apr 2019 02:21:44 -0700 To: Lee Daly , liang.j.ma@intel.com Cc: dev@dpdk.org, stable@dpdk.org References: <1555084647-75896-1-git-send-email-lee.daly@intel.com> From: "Hunt, David" Message-ID: <0e4ce484-1ae1-e759-9e81-e6328e0911bc@intel.com> Date: Mon, 15 Apr 2019 10:21:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1555084647-75896-1-git-send-email-lee.daly@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH] lib/librte_power: set new frequecy on turbo_disable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190415092143.JSuHX8bve9fUT4yeJvozGrIbroeWugi7ziFTXwcCSZI@z> 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 > --- > 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