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 0A385A04F0 for ; Thu, 19 Dec 2019 15:41:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F3BF41BDFD; Thu, 19 Dec 2019 15:41:58 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 09C221C032 for ; Thu, 19 Dec 2019 15:41:57 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id q9so5693342wmj.5 for ; Thu, 19 Dec 2019 06:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YEFC1EXul5Si1n+M5CpubseX/Its23b8/V8Cq5IJaFw=; b=Gq5xlf4ATiw9gCauLUH8YOtvgxcXglAc51PoQBmfvp+rbWkJ4m2brc8+UjoGYEfMY+ 4dln7l/I+xlTdJ/n+/SyB+0JKxGkGXIUt3tMdvxN0m7NQD+xFdhb+03bZRNl0fKvX105 wtibWAGJy14++u1jID+ER7VrwHVZBP3M/r1sFiqOq0Kq5ADYM07pMalv2UmOPrPHwP/7 Hrg4HVQM/zuv0WtSG7e3EzrTv9q/3LGvYi+rVukuQxm+8DuRV92QUwbeMxxZRmZ+geQl zNJgRDNehYyaLpGXOc39sQiTeOc8G7jKmHz2x44fvr/CGp4e/aAWif3lCT0s600IznHa 7Cpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YEFC1EXul5Si1n+M5CpubseX/Its23b8/V8Cq5IJaFw=; b=J2TC+3MsPoNoq07Nej6eyOy/n9lc9W8jsEGrBF7omPwkIQ2EYDhhWsrpLJr0mmzoSG qVRmqZgp1btdfmNRDgFEZsR3oGqNwlIza94VPKeu7dZefJbAmuoicVxIVpYSj+yaSgD0 5mHzGBQaqwTiN9azJAW/OOiu8LrHv0kfrO6kc6MBpzirQRG3qD6C5H6pzVFG38w3wvao oxsPKeJuQrw22OSBl3zQoFDIPub6GqOp3RMLV90Esk0sQeWkkNT/91eE9vxViXC6OGpv 9S5CGokbNZfSLqVbekSdQ1QshdBQ2WeJeS7bBkbNZhMucENtD4R1Pdz9UJgpZktTkzmc cgjQ== X-Gm-Message-State: APjAAAW2u1fALVmGF6ouGWPcysDVklTM+nl7vJllJkHeF5iTZ7fR4baf pGRWwrfXHIS4jjvszoGaZi8= X-Google-Smtp-Source: APXvYqwskF2s0tRkPql+5xF8RFQYcOcucfDMGFvZpUQwJKRLeky8lpJxXjwkNj+8AmG3TwAT2kwuog== X-Received: by 2002:a1c:e909:: with SMTP id q9mr10930272wmc.30.1576766516763; Thu, 19 Dec 2019 06:41:56 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z18sm6205500wmf.21.2019.12.19.06.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:41:56 -0800 (PST) From: luca.boccassi@gmail.com To: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Cc: David Hunt , Liang Ma , dpdk stable Date: Thu, 19 Dec 2019 14:34:36 +0000 Message-Id: <20191219143447.21506-129-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'power: handle frequency increase with turbo disabled' has been queued to LTS release 17.11.10 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 17.11.10 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/21/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From a949223584bdedc520cd453a04bf4f9dbdebce42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= 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=UTF-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önnblom Tested-by: David Hunt Acked-by: David Hunt Reviewed-by: Liang Ma --- lib/librte_power/rte_power_acpi_cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_power/rte_power_acpi_cpufreq.c b/lib/librte_power/rte_power_acpi_cpufreq.c index 3ce5a0d890..63ad029d32 100644 --- a/lib/librte_power/rte_power_acpi_cpufreq.c +++ b/lib/librte_power/rte_power_acpi_cpufreq.c @@ -531,7 +531,8 @@ rte_power_acpi_cpufreq_freq_up(unsigned lcore_id) } pi = &lcore_power_info[lcore_id]; - if (pi->curr_idx == 0) + if (pi->curr_idx == 0 || + (pi->curr_idx == 1 && pi->turbo_available && !pi->turbo_enable)) return 0; /* Frequencies in the array are from high to low. */ -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:31.454659657 +0000 +++ 0129-power-handle-frequency-increase-with-turbo-disabled.patch 2019-12-19 14:32:26.333302346 +0000 @@ -1,4 +1,4 @@ -From 388c4c03eca316698d2bb55435ec5c804c67c844 Mon Sep 17 00:00:00 2001 +From a949223584bdedc520cd453a04bf4f9dbdebce42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Thu, 14 Nov 2019 15:10:36 +0100 Subject: [PATCH] power: handle frequency increase with turbo disabled @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-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. @@ -21,36 +23,20 @@ Fixes: 445c6528b55f ("power: common interface for guest and host") Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility") -Cc: stable@dpdk.org Signed-off-by: Mattias Rönnblom Tested-by: David Hunt Acked-by: David Hunt Reviewed-by: Liang Ma --- - lib/librte_power/power_acpi_cpufreq.c | 3 ++- - lib/librte_power/power_pstate_cpufreq.c | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c -index 22989244ab..f443fce69f 100644 ---- a/lib/librte_power/power_acpi_cpufreq.c -+++ b/lib/librte_power/power_acpi_cpufreq.c -@@ -515,7 +515,8 @@ power_acpi_cpufreq_freq_up(unsigned int lcore_id) - } - - pi = &lcore_power_info[lcore_id]; -- if (pi->curr_idx == 0) -+ if (pi->curr_idx == 0 || -+ (pi->curr_idx == 1 && pi->turbo_available && !pi->turbo_enable)) - return 0; - - /* Frequencies in the array are from high to low. */ -diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c -index 8f095e0ab1..2d8a9499dc 100644 ---- a/lib/librte_power/power_pstate_cpufreq.c -+++ b/lib/librte_power/power_pstate_cpufreq.c -@@ -696,7 +696,8 @@ power_pstate_cpufreq_freq_up(unsigned int lcore_id) + lib/librte_power/rte_power_acpi_cpufreq.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/librte_power/rte_power_acpi_cpufreq.c b/lib/librte_power/rte_power_acpi_cpufreq.c +index 3ce5a0d890..63ad029d32 100644 +--- a/lib/librte_power/rte_power_acpi_cpufreq.c ++++ b/lib/librte_power/rte_power_acpi_cpufreq.c +@@ -531,7 +531,8 @@ rte_power_acpi_cpufreq_freq_up(unsigned lcore_id) } pi = &lcore_power_info[lcore_id];