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 78508A00E6 for ; Mon, 15 Apr 2019 18:11:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E6371B295; Mon, 15 Apr 2019 18:11:16 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2C5BC1B295; Mon, 15 Apr 2019 18:11:13 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 09:11:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,354,1549958400"; d="scan'208";a="223718074" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 15 Apr 2019 09:11:11 -0700 Received: from sivswdev09.ir.intel.com (sivswdev09.ir.intel.com [10.237.217.48]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x3FGBARY007073; Mon, 15 Apr 2019 17:11:10 +0100 Received: from sivswdev09.ir.intel.com (localhost [127.0.0.1]) by sivswdev09.ir.intel.com with ESMTP id x3FGBAhA003539; Mon, 15 Apr 2019 17:11:10 +0100 Received: (from lma25@localhost) by sivswdev09.ir.intel.com with LOCAL id x3FGBAxG003534; Mon, 15 Apr 2019 17:11:10 +0100 Date: Mon, 15 Apr 2019 17:11:10 +0100 From: "Liang, Ma" To: Lee Daly Cc: david.hunt@intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20190415161110.GA17469@sivswdev09.ir.intel.com> References: <1555084647-75896-1-git-send-email-lee.daly@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555084647-75896-1-git-send-email-lee.daly@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-stable] [PATCH] lib/librte_power: set new frequecy on turbo_disable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Acked-by: Liang Ma 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 > --- > 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 >