From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 594ACA04F5 for ; Wed, 11 Dec 2019 22:28:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 422EB1D9E; Wed, 11 Dec 2019 22:28:58 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id B04FD2BD3 for ; Wed, 11 Dec 2019 22:28:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ysWm6FRF2HAVBGFBtus/QSSVHCnNCVGbMlwI/PcOcy8=; b=VPX8dqB7GwodqTzWKZ0uSUtZHbaQec5exIC5+uKMlKjuQIBCXGMCjdAURD/vsbyO2FkrZx jgto1i5NlOhuxVnyWcP1y76oPLrYiQ9bjfZNTU/VGHb+xBmuhCN2CWWlweRGMdIHpjFNUo 8cUhC44xi2nYEuwLuTwP7SGm1hn1Ilk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-246-oktjzJHCP1iBVSnEFI8lHw-1; Wed, 11 Dec 2019 16:28:55 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 12EC6800EC0; Wed, 11 Dec 2019 21:28:54 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC86210013A1; Wed, 11 Dec 2019 21:28:52 +0000 (UTC) From: Kevin Traynor To: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Cc: David Hunt , Liang Ma , dpdk stable Date: Wed, 11 Dec 2019 21:26:38 +0000 Message-Id: <20191211212702.27851-46-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: oktjzJHCP1iBVSnEFI8lHw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'power: handle frequency increase with turbo disabled' has been queued to LTS release 18.11.6 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" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/65ce5cdd91f8c1ac30= 2ce4e07c797b07f37142bc Thanks. Kevin. --- >From 65ce5cdd91f8c1ac302ce4e07c797b07f37142bc Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Mattias=3D20R=3DC3=3DB6nnblom?=3D Date: Thu, 14 Nov 2019 15:10:36 +0100 Subject: [PATCH] power: handle frequency increase with turbo disabled MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 388c4c03eca316698d2bb55435ec5c804c67c844 ] Calling pstate's or acpi's rte_power_freq_up() when on the highest non-turbo frequency results in an error, if turbo is enabled in the BIOS, but disabled via the power library. The error is in the form of a return code and a RTE_LOG() entry on the ERR level. According to the API documentation, the frequency is scaled up "according to the available frequencies". In case turbo is disabled, that frequency is not available. This patch's rte_power_freq_up() behaviour is also consistent with how rte_power_freq_max() is implemented (i.e. the highest non-turbo frequency is set, in case turbo is disabled). Fixes: 445c6528b55f ("power: common interface for guest and host") Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility") Signed-off-by: Mattias R=C3=B6nnblom Tested-by: David Hunt Acked-by: David Hunt Reviewed-by: Liang Ma --- lib/librte_power/power_acpi_cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power= _acpi_cpufreq.c index 6051e02d9..85edb9aec 100644 --- a/lib/librte_power/power_acpi_cpufreq.c +++ b/lib/librte_power/power_acpi_cpufreq.c @@ -506,5 +506,6 @@ power_acpi_cpufreq_freq_up(unsigned int lcore_id) =20 =09pi =3D &lcore_power_info[lcore_id]; -=09if (pi->curr_idx =3D=3D 0) +=09if (pi->curr_idx =3D=3D 0 || +=09 (pi->curr_idx =3D=3D 1 && pi->turbo_available && !pi->turbo_enable)= ) =09=09return 0; =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:16.359836590 +0000 +++ 0046-power-handle-frequency-increase-with-turbo-disabled.patch=092019-1= 2-11 21:24:12.705650432 +0000 @@ -1 +1 @@ -From 388c4c03eca316698d2bb55435ec5c804c67c844 Mon Sep 17 00:00:00 2001 +From 65ce5cdd91f8c1ac302ce4e07c797b07f37142bc Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 388c4c03eca316698d2bb55435ec5c804c67c844 ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -31,3 +32,2 @@ - lib/librte_power/power_acpi_cpufreq.c | 3 ++- - lib/librte_power/power_pstate_cpufreq.c | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) + lib/librte_power/power_acpi_cpufreq.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) @@ -36 +36 @@ -index 22989244a..f443fce69 100644 +index 6051e02d9..85edb9aec 100644 @@ -39,13 +39 @@ -@@ -516,5 +516,6 @@ power_acpi_cpufreq_freq_up(unsigned int lcore_id) -=20 - =09pi =3D &lcore_power_info[lcore_id]; --=09if (pi->curr_idx =3D=3D 0) -+=09if (pi->curr_idx =3D=3D 0 || -+=09 (pi->curr_idx =3D=3D 1 && pi->turbo_available && !pi->turbo_enable= )) - =09=09return 0; -=20 -diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/po= wer_pstate_cpufreq.c -index 8f095e0ab..2d8a9499d 100644 ---- a/lib/librte_power/power_pstate_cpufreq.c -+++ b/lib/librte_power/power_pstate_cpufreq.c -@@ -697,5 +697,6 @@ power_pstate_cpufreq_freq_up(unsigned int lcore_id) +@@ -506,5 +506,6 @@ power_acpi_cpufreq_freq_up(unsigned int lcore_id)