From patchwork Wed Sep 11 03:15:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Henrique Kopper X-Patchwork-Id: 1983609 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X3Qlw0Bl7z1y1y for ; Wed, 11 Sep 2024 13:19:23 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1soDst-0004wt-L9; Wed, 11 Sep 2024 03:19:11 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1soDss-0004wi-0v for kernel-team@lists.ubuntu.com; Wed, 11 Sep 2024 03:19:10 +0000 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id BCE673F1FC for ; Wed, 11 Sep 2024 03:19:09 +0000 (UTC) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-7d4f9e1a1a0so7986466a12.1 for ; Tue, 10 Sep 2024 20:19:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726024748; x=1726629548; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dlC9BdB3MqOrBgD4Pu9ORYF6ygB6iw8+cQWLmXnnwSU=; b=Ruxxuw+yGxfSdhHGIufpphAmEccDnZBrPHKgBPUObK1n1jI2MXWptyRPdjR5Tv0Ldl bflyNQ7UmIN07ZuQDeysxwHUjxTNrWI77H2WXd6+X90WKqcYO5piGdZvZVa+crM9eq8Z ZcTJiSiwKnScQOx10PpC9MLoczU3B8ojfCVNhh2ol/AsS1z7gDomAdGTXDE6IXpVjEHB KGPol9gMKI6mv6KfY2r89qT6ksaBBNWb5YW15IomB1WnytroSR8TZDwBcfUjA1cQRsFq Xbui5VK0IfqxpTS79SKRHdr9IV30wkc0bu3Z/0Z2KyQF+WzyvBY8Nz8a0mGBG4yHoDSM yCWw== X-Gm-Message-State: AOJu0YxvclZYocFq2LbHu1FSCo2dVMERuiNRNTLXAQAXK5DTX3sJX577 d8cMtpeRD3oGdcOcbwaxPSmlPneeyuFBvGgM3BQaqC5d8l5AuC1FNBnVinCyCzglWdT4/lz3j9f WTvDgeJTNMOWwVWj252vu+ECecgcLT40L2EPgw4VZpQ7sDWXwsdRc8AAuMccp1HptQ89m1bYUDU DRgFUpHMQJzw== X-Received: by 2002:a05:6a21:3a96:b0:1cf:52aa:98b0 with SMTP id adf61e73a8af0-1cf5e1b5e9fmr3976790637.33.1726024748110; Tue, 10 Sep 2024 20:19:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEj0fViritz/ykbcNJCZob7AObPrmgG+B3KWAUrM5909r4WRQQky+7I+9mpOtAm9SBmKOIviQ== X-Received: by 2002:a05:6a21:3a96:b0:1cf:52aa:98b0 with SMTP id adf61e73a8af0-1cf5e1b5e9fmr3976770637.33.1726024747672; Tue, 10 Sep 2024 20:19:07 -0700 (PDT) Received: from localhost.localdomain ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d823cf3cefsm5399903a12.32.2024.09.10.20.19.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:19:07 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH v3 1/6] cpufreq: intel_pstate: Allow model specific EPPs Date: Wed, 11 Sep 2024 00:15:47 -0300 Message-ID: <20240911031901.3907840-2-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911031901.3907840-1-pedro.kopper@canonical.com> References: <20240911031901.3907840-1-pedro.kopper@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Srinivas Pandruvada BugLink: https://bugs.launchpad.net/bugs/2077470 The current implementation allows model specific EPP override for balanced_performance. Add feature to allow model specific EPP for all predefined EPP strings. For example for some CPU models, even changing performance EPP has benefits Use a mask of EPPs as driver_data instead of just balanced_performance. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki (cherry picked from commit 240a8da623008eb9f4e32c7a19ce16a6605911dc) Signed-off-by: Pedro Henrique Kopper --- drivers/cpufreq/intel_pstate.c | 41 +++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 79619227ea51..58dbfe9b76ae 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -3407,14 +3408,29 @@ static bool intel_pstate_hwp_is_enabled(void) return !!(value & 0x1); } -static const struct x86_cpu_id intel_epp_balance_perf[] = { +#define POWERSAVE_MASK GENMASK(7, 0) +#define BALANCE_POWER_MASK GENMASK(15, 8) +#define BALANCE_PERFORMANCE_MASK GENMASK(23, 16) +#define PERFORMANCE_MASK GENMASK(31, 24) + +#define HWP_SET_EPP_VALUES(powersave, balance_power, balance_perf, performance) \ + (FIELD_PREP_CONST(POWERSAVE_MASK, powersave) |\ + FIELD_PREP_CONST(BALANCE_POWER_MASK, balance_power) |\ + FIELD_PREP_CONST(BALANCE_PERFORMANCE_MASK, balance_perf) |\ + FIELD_PREP_CONST(PERFORMANCE_MASK, performance)) + +#define HWP_SET_DEF_BALANCE_PERF_EPP(balance_perf) \ + (HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, HWP_EPP_BALANCE_POWERSAVE,\ + balance_perf, HWP_EPP_PERFORMANCE)) + +static const struct x86_cpu_id intel_epp_default[] = { /* * Set EPP value as 102, this is the max suggested EPP * which can result in one core turbo frequency for * AlderLake Mobile CPUs. */ - X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, 102), - X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, 32), + X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, HWP_SET_DEF_BALANCE_PERF_EPP(102)), + X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), {} }; @@ -3512,11 +3528,24 @@ static int __init intel_pstate_init(void) intel_pstate_sysfs_expose_params(); if (hwp_active) { - const struct x86_cpu_id *id = x86_match_cpu(intel_epp_balance_perf); + const struct x86_cpu_id *id = x86_match_cpu(intel_epp_default); const struct x86_cpu_id *hybrid_id = x86_match_cpu(intel_hybrid_scaling_factor); - if (id) - epp_values[EPP_INDEX_BALANCE_PERFORMANCE] = id->driver_data; + if (id) { + epp_values[EPP_INDEX_POWERSAVE] = + FIELD_GET(POWERSAVE_MASK, id->driver_data); + epp_values[EPP_INDEX_BALANCE_POWERSAVE] = + FIELD_GET(BALANCE_POWER_MASK, id->driver_data); + epp_values[EPP_INDEX_BALANCE_PERFORMANCE] = + FIELD_GET(BALANCE_PERFORMANCE_MASK, id->driver_data); + epp_values[EPP_INDEX_PERFORMANCE] = + FIELD_GET(PERFORMANCE_MASK, id->driver_data); + pr_debug("Updated EPPs powersave:%x balanced power:%x balanced perf:%x performance:%x\n", + epp_values[EPP_INDEX_POWERSAVE], + epp_values[EPP_INDEX_BALANCE_POWERSAVE], + epp_values[EPP_INDEX_BALANCE_PERFORMANCE], + epp_values[EPP_INDEX_PERFORMANCE]); + } if (hybrid_id) { hybrid_scaling_factor = hybrid_id->driver_data; From patchwork Wed Sep 11 03:15:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Henrique Kopper X-Patchwork-Id: 1983611 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X3Qlw0LFhz1y24 for ; Wed, 11 Sep 2024 13:19:23 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1soDsv-0004xy-9g; Wed, 11 Sep 2024 03:19:13 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1soDst-0004ws-L5 for kernel-team@lists.ubuntu.com; Wed, 11 Sep 2024 03:19:11 +0000 Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 50D493F32F for ; Wed, 11 Sep 2024 03:19:11 +0000 (UTC) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-7163489149fso1773827a12.3 for ; Tue, 10 Sep 2024 20:19:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726024750; x=1726629550; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O0OX9Ea0HmvF7QCfgtDfTZHrrYknNGjy+DVq/E7Sysg=; b=TjJSHI10wbe1WHx5N3LRmx8WHIsMg92AyQKBd8ebJyzY3OJXH9g1GoirA0zLqh9wLg wWdCXf1l+7lZISOVsv86wTgw91ZqCMin3dXvRiz0w78a7Ff+EF2XlFdoBDTAqHod8Nzb H9MeyT/aPyc9rIyWxgrDIbHtzuUaF1Eb/cgYdHthHVPonxlL9hzlmUMfpoHxYEw4mD5H vYX5cG+w69qmqMbnbx1cbonuA6dQunqDkhHoAZY957qoOMmCIApHIFycc+cD7FhIu4Ob SiT7mwdMKy8+lCTcQ//x1gCWeU2RSP7YwxGlCWy0ncjNDWIka7ao+JZJLM9XpoweEI0O 8Pdg== X-Gm-Message-State: AOJu0Yx8EPcuL35REPBtdm4e+DhISvkiX/5RgKRo1Y6ZjiujMlwEqAHX 5BcSX3O0asSHEQNLPhB7W9LVal4/CSu/HthtuOcbqunmXpY71U9CmBmbUjhnAG0aYrC5rEDgoEA V3TuwzTzxaj/zCgXJdYjTOb3bPeYs9WzkyPiPU4yIMBrVwoyFS3WqUlaVO5FPZd2n4tLtr7hUxI 7Ft5UxI5QZpw== X-Received: by 2002:a05:6a21:4581:b0:1cf:5155:cb5c with SMTP id adf61e73a8af0-1cf62d5ca33mr2732926637.34.1726024749769; Tue, 10 Sep 2024 20:19:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEiikvJNBb/jDVjGkSFIwkePq1u/T9zUbA1pyv2zzagH7tx9IrdQssP4owwrAhJdq6zXxrlw== X-Received: by 2002:a05:6a21:4581:b0:1cf:5155:cb5c with SMTP id adf61e73a8af0-1cf62d5ca33mr2732890637.34.1726024749252; Tue, 10 Sep 2024 20:19:09 -0700 (PDT) Received: from localhost.localdomain ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d823cf3cefsm5399903a12.32.2024.09.10.20.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:19:08 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH v3 2/6] cpufreq: intel_pstate: Update default EPPs for Meteor Lake Date: Wed, 11 Sep 2024 00:15:48 -0300 Message-ID: <20240911031901.3907840-3-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911031901.3907840-1-pedro.kopper@canonical.com> References: <20240911031901.3907840-1-pedro.kopper@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Srinivas Pandruvada BugLink: https://bugs.launchpad.net/bugs/2077470 Update default balanced_performance EPP to 115 and performance EPP to 16. Changing the balanced_performance EPP has better performance/watt compared to default powerup EPP value of 128. Changing the performance EPP to 0x10 shows reduced power for similar performance as EPP 0. On small form factor devices this is beneficial as lower power results in lower CPU and skin temperature. This results in reduced thermal throttling and higher performance. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki (cherry picked from commit 1f4b7fdd71e066aa7c01e3e26ceeb39b47dd5461) Signed-off-by: Pedro Henrique Kopper --- drivers/cpufreq/intel_pstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 58dbfe9b76ae..18ba78cdf6ed 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3431,6 +3431,8 @@ static const struct x86_cpu_id intel_epp_default[] = { */ X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, HWP_SET_DEF_BALANCE_PERF_EPP(102)), X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), + X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, + HWP_EPP_BALANCE_POWERSAVE, 115, 16)), {} }; From patchwork Wed Sep 11 03:15:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Henrique Kopper X-Patchwork-Id: 1983610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X3Qlw0DQdz1y21 for ; Wed, 11 Sep 2024 13:19:23 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1soDsx-0004z3-GA; Wed, 11 Sep 2024 03:19:15 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1soDsv-0004xq-4o for kernel-team@lists.ubuntu.com; Wed, 11 Sep 2024 03:19:13 +0000 Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id C9BEF3F5BC for ; Wed, 11 Sep 2024 03:19:12 +0000 (UTC) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-718ea791e44so3904059b3a.0 for ; Tue, 10 Sep 2024 20:19:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726024751; x=1726629551; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k6ipLAwm+nBsRjXwC0nsPaH74g+tNicIsGHVVsCqaT4=; b=GQHsguQD7KCZwjrs5DW5hk+V13NLdmNp+M8N0c7ruQntdevtMQYREIdiNWNP/0Ah8O MsaEJaOl7fQQKUh02ypNkKOTPzobmgdD0iz40vMgWgvodf04+IydYtKBg9vTQAuzcOm0 UQhno0x0SmLPxbX2gJATkFMW6WCTzjrDFZ9KQnOfg6SJCzAE8Fa+KYvm+FmrZqnGfawK Z4WmAMCOTY+RovucYz4FTuZuZZ/Zsy77MWz9fRmCk3mUPrd/S4QASU1/bN3E0+IVX1S2 zPeFQMC3WctFQHRPk8ZpklYeiRSRsqJDCbMaABlKzsq5Nl/9VdyKB5ebR/YHDtCCZo1c K0Og== X-Gm-Message-State: AOJu0YyhowCrrkR2PBZCbonb8Ch0YO0Tn2sJ0NVOdXoNqySE8sOkG8rN lAlNuwiapzo9rsZJljBGcjfTN5BySzcHJNtJkV6IJEIk9q+XQwyzumx4WtpqK7ZKaZ6h1irMsWT Ckz8gJzzEAcllbE8JjKNG4o7NvTgEj0Dluz9iedmbNBaunfJEq3vjUzfolRSWo3oXKShSR8g85e JQvbXVjIC0lA== X-Received: by 2002:a05:6a21:3115:b0:1cf:4491:b6b7 with SMTP id adf61e73a8af0-1cf5e04881emr3618069637.3.1726024751329; Tue, 10 Sep 2024 20:19:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqXscqqi6KS0PQyD5ilpNBp/6dpqcr0xTCytU5YTSXxLbOaPsiDhfujEcXjiiFTNWNhM68GQ== X-Received: by 2002:a05:6a21:3115:b0:1cf:4491:b6b7 with SMTP id adf61e73a8af0-1cf5e04881emr3618040637.3.1726024750832; Tue, 10 Sep 2024 20:19:10 -0700 (PDT) Received: from localhost.localdomain ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d823cf3cefsm5399903a12.32.2024.09.10.20.19.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:19:10 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH v3 3/6] cpufreq: intel_pstate: Switch to new Intel CPU model defines Date: Wed, 11 Sep 2024 00:15:49 -0300 Message-ID: <20240911031901.3907840-4-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911031901.3907840-1-pedro.kopper@canonical.com> References: <20240911031901.3907840-1-pedro.kopper@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Tony Luck BugLink: https://bugs.launchpad.net/bugs/2077470 New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki (backported from commit ca8752384c6f75a38aef40f0cbcb810af172feec) [phckopper: minor context adjustment] Signed-off-by: Pedro Henrique Kopper --- drivers/cpufreq/intel_pstate.c | 90 +++++++++++++++++----------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 18ba78cdf6ed..a6a3c7e49950 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -2405,52 +2405,51 @@ static const struct pstate_funcs knl_funcs = { .get_val = core_get_val, }; -#define X86_MATCH(model, policy) \ - X86_MATCH_VENDOR_FAM_MODEL_FEATURE(INTEL, 6, INTEL_FAM6_##model, \ - X86_FEATURE_APERFMPERF, &policy) +#define X86_MATCH(vfm, policy) \ + X86_MATCH_VFM_FEATURE(vfm, X86_FEATURE_APERFMPERF, &policy) static const struct x86_cpu_id intel_pstate_cpu_ids[] = { - X86_MATCH(SANDYBRIDGE, core_funcs), - X86_MATCH(SANDYBRIDGE_X, core_funcs), - X86_MATCH(ATOM_SILVERMONT, silvermont_funcs), - X86_MATCH(IVYBRIDGE, core_funcs), - X86_MATCH(HASWELL, core_funcs), - X86_MATCH(BROADWELL, core_funcs), - X86_MATCH(IVYBRIDGE_X, core_funcs), - X86_MATCH(HASWELL_X, core_funcs), - X86_MATCH(HASWELL_L, core_funcs), - X86_MATCH(HASWELL_G, core_funcs), - X86_MATCH(BROADWELL_G, core_funcs), - X86_MATCH(ATOM_AIRMONT, airmont_funcs), - X86_MATCH(SKYLAKE_L, core_funcs), - X86_MATCH(BROADWELL_X, core_funcs), - X86_MATCH(SKYLAKE, core_funcs), - X86_MATCH(BROADWELL_D, core_funcs), - X86_MATCH(XEON_PHI_KNL, knl_funcs), - X86_MATCH(XEON_PHI_KNM, knl_funcs), - X86_MATCH(ATOM_GOLDMONT, core_funcs), - X86_MATCH(ATOM_GOLDMONT_PLUS, core_funcs), - X86_MATCH(SKYLAKE_X, core_funcs), - X86_MATCH(COMETLAKE, core_funcs), - X86_MATCH(ICELAKE_X, core_funcs), - X86_MATCH(TIGERLAKE, core_funcs), - X86_MATCH(SAPPHIRERAPIDS_X, core_funcs), - X86_MATCH(EMERALDRAPIDS_X, core_funcs), + X86_MATCH(INTEL_SANDYBRIDGE, core_funcs), + X86_MATCH(INTEL_SANDYBRIDGE_X, core_funcs), + X86_MATCH(INTEL_ATOM_SILVERMONT, silvermont_funcs), + X86_MATCH(INTEL_IVYBRIDGE, core_funcs), + X86_MATCH(INTEL_HASWELL, core_funcs), + X86_MATCH(INTEL_BROADWELL, core_funcs), + X86_MATCH(INTEL_IVYBRIDGE_X, core_funcs), + X86_MATCH(INTEL_HASWELL_X, core_funcs), + X86_MATCH(INTEL_HASWELL_L, core_funcs), + X86_MATCH(INTEL_HASWELL_G, core_funcs), + X86_MATCH(INTEL_BROADWELL_G, core_funcs), + X86_MATCH(INTEL_ATOM_AIRMONT, airmont_funcs), + X86_MATCH(INTEL_SKYLAKE_L, core_funcs), + X86_MATCH(INTEL_BROADWELL_X, core_funcs), + X86_MATCH(INTEL_SKYLAKE, core_funcs), + X86_MATCH(INTEL_BROADWELL_D, core_funcs), + X86_MATCH(INTEL_XEON_PHI_KNL, knl_funcs), + X86_MATCH(INTEL_XEON_PHI_KNM, knl_funcs), + X86_MATCH(INTEL_ATOM_GOLDMONT, core_funcs), + X86_MATCH(INTEL_ATOM_GOLDMONT_PLUS, core_funcs), + X86_MATCH(INTEL_SKYLAKE_X, core_funcs), + X86_MATCH(INTEL_COMETLAKE, core_funcs), + X86_MATCH(INTEL_ICELAKE_X, core_funcs), + X86_MATCH(INTEL_TIGERLAKE, core_funcs), + X86_MATCH(INTEL_SAPPHIRERAPIDS_X, core_funcs), + X86_MATCH(INTEL_EMERALDRAPIDS_X, core_funcs), {} }; MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = { - X86_MATCH(BROADWELL_D, core_funcs), - X86_MATCH(BROADWELL_X, core_funcs), - X86_MATCH(SKYLAKE_X, core_funcs), - X86_MATCH(ICELAKE_X, core_funcs), - X86_MATCH(SAPPHIRERAPIDS_X, core_funcs), + X86_MATCH(INTEL_BROADWELL_D, core_funcs), + X86_MATCH(INTEL_BROADWELL_X, core_funcs), + X86_MATCH(INTEL_SKYLAKE_X, core_funcs), + X86_MATCH(INTEL_ICELAKE_X, core_funcs), + X86_MATCH(INTEL_SAPPHIRERAPIDS_X, core_funcs), {} }; static const struct x86_cpu_id intel_pstate_cpu_ee_disable_ids[] = { - X86_MATCH(KABYLAKE, core_funcs), + X86_MATCH(INTEL_KABYLAKE, core_funcs), {} }; @@ -3389,14 +3388,13 @@ static inline void intel_pstate_request_control_from_smm(void) {} #define INTEL_PSTATE_HWP_BROADWELL 0x01 -#define X86_MATCH_HWP(model, hwp_mode) \ - X86_MATCH_VENDOR_FAM_MODEL_FEATURE(INTEL, 6, INTEL_FAM6_##model, \ - X86_FEATURE_HWP, hwp_mode) +#define X86_MATCH_HWP(vfm, hwp_mode) \ + X86_MATCH_VFM_FEATURE(vfm, X86_FEATURE_HWP, hwp_mode) static const struct x86_cpu_id hwp_support_ids[] __initconst = { - X86_MATCH_HWP(BROADWELL_X, INTEL_PSTATE_HWP_BROADWELL), - X86_MATCH_HWP(BROADWELL_D, INTEL_PSTATE_HWP_BROADWELL), - X86_MATCH_HWP(ANY, 0), + X86_MATCH_HWP(INTEL_BROADWELL_X, INTEL_PSTATE_HWP_BROADWELL), + X86_MATCH_HWP(INTEL_BROADWELL_D, INTEL_PSTATE_HWP_BROADWELL), + X86_MATCH_HWP(INTEL_ANY, 0), {} }; @@ -3429,15 +3427,15 @@ static const struct x86_cpu_id intel_epp_default[] = { * which can result in one core turbo frequency for * AlderLake Mobile CPUs. */ - X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, HWP_SET_DEF_BALANCE_PERF_EPP(102)), - X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), - X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, - HWP_EPP_BALANCE_POWERSAVE, 115, 16)), + X86_MATCH_VFM(INTEL_ALDERLAKE_L, HWP_SET_DEF_BALANCE_PERF_EPP(102)), + X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), + X86_MATCH_VFM(INTEL_METEORLAKE_L, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, + HWP_EPP_BALANCE_POWERSAVE, 115, 16)), {} }; static const struct x86_cpu_id intel_hybrid_scaling_factor[] = { - X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, HYBRID_SCALING_FACTOR_MTL), + X86_MATCH_VFM(INTEL_METEORLAKE_L, HYBRID_SCALING_FACTOR_MTL), {} }; From patchwork Wed Sep 11 03:15:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Henrique Kopper X-Patchwork-Id: 1983614 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X3Qlx3tHvz1y1y for ; Wed, 11 Sep 2024 13:19:25 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1soDsz-00051i-L7; Wed, 11 Sep 2024 03:19:17 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1soDsy-0004zY-1w for kernel-team@lists.ubuntu.com; Wed, 11 Sep 2024 03:19:16 +0000 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C8A963F1FC for ; Wed, 11 Sep 2024 03:19:15 +0000 (UTC) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-718dd4aa409so351223b3a.1 for ; Tue, 10 Sep 2024 20:19:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726024753; x=1726629553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MimhW8OrrJp31LWThGtwvMNhnMe9Rsat7Up+BwObEk4=; b=mOoAlPcua0zS1Q59H6FmJ2a8hd/mWgl/Un4VNloe2xyYVqm6h/TTkT7JWsYO8fETM/ jObHECLJBvlXxcwl5IfucL8WOffyZoq3K2p+rL4lff3rMfIqgVBJXr4T/9aAd/SlvRdZ d67+g7HilxlThWlq1wIHELd9syT75v8E/wf4r1v4/rfNxREai6Z22itf7n6OTPUkcG99 kY8EFY59vzHjDJeyS4VZbC5EXQFnv19S+Ov+EHM3jtvrwU0HLSr8wbkeRdIlGO80rs9c 3jhqn8y3fRD0e3kbmgmBf53JdjxKgHRqOfnoLFlfYnWR9gMe3lidhFN1blxYpms/krKU Nbsg== X-Gm-Message-State: AOJu0YwXKhTW5slqJrsTaj7FD/1cDGAl8xGrRI0xA5QayjCvszIlSX6m CPbDg/83PI90GB+i05oR4us4l9lnO44GUVjcHsivVqRS8XUmI29g7BMl3rI/tNBlygFj9CR97v7 589K0eLZn+xApwLfmlGtmZRwkd8o+NkPehqLmKEw+QddVVvGZh4xF0rMraKjrF29tSlrT/WFG3Z uRJRpOK7uYjg== X-Received: by 2002:a05:6a21:6d97:b0:1cf:34c3:9d0 with SMTP id adf61e73a8af0-1cf5e1ae559mr3970429637.17.1726024753046; Tue, 10 Sep 2024 20:19:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/R9Gfqe4U1T8fd3Mxb5HRTAVVY3UClscqKrz3DQoviNeLx/E1AIJgXTY8VoeOTvAplCohBQ== X-Received: by 2002:a05:6a21:6d97:b0:1cf:34c3:9d0 with SMTP id adf61e73a8af0-1cf5e1ae559mr3970400637.17.1726024752423; Tue, 10 Sep 2024 20:19:12 -0700 (PDT) Received: from localhost.localdomain ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d823cf3cefsm5399903a12.32.2024.09.10.20.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:19:12 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH v3 4/6] cpufreq: intel_pstate: Update Meteor Lake EPPs Date: Wed, 11 Sep 2024 00:15:50 -0300 Message-ID: <20240911031901.3907840-5-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911031901.3907840-1-pedro.kopper@canonical.com> References: <20240911031901.3907840-1-pedro.kopper@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Srinivas Pandruvada BugLink: https://bugs.launchpad.net/bugs/2077470 Update the default balance_performance EPP to 64. This gives better performance and also perf/watt compared to current value of 115. For example: Speedometer 2.1 score: +19% Perf/watt: +5.25% Webxprt 4 score score: +12% Perf/watt: +6.12% 3DMark Wildlife extreme unlimited score score: +3.2% Perf/watt: +11.5% Geekbench6 MT score: +2.14% Perf/watt: +0.32% Also update balance_power EPP default to 179. With this change: Video Playback power is reduced by 52% Team video conference power is reduced by 35% With Power profile daemon now sets balance_power EPP on DC instead of balance_performance, updating balance_power EPP will help to extend battery life. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki (cherry picked from commit 8bdab3c8f2e696fcb3bf65832376ac91ef6da271) Signed-off-by: Pedro Henrique Kopper --- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index a6a3c7e49950..478507f40acb 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3430,7 +3430,7 @@ static const struct x86_cpu_id intel_epp_default[] = { X86_MATCH_VFM(INTEL_ALDERLAKE_L, HWP_SET_DEF_BALANCE_PERF_EPP(102)), X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), X86_MATCH_VFM(INTEL_METEORLAKE_L, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, - HWP_EPP_BALANCE_POWERSAVE, 115, 16)), + 179, 64, 16)), {} }; From patchwork Wed Sep 11 03:15:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Henrique Kopper X-Patchwork-Id: 1983613 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X3Qlw5W9nz1y25 for ; Wed, 11 Sep 2024 13:19:24 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1soDsz-00051r-Qe; Wed, 11 Sep 2024 03:19:17 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1soDsy-00050M-Ip for kernel-team@lists.ubuntu.com; Wed, 11 Sep 2024 03:19:16 +0000 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 6CCD53F1FC for ; Wed, 11 Sep 2024 03:19:16 +0000 (UTC) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-6507e2f0615so7130023a12.1 for ; Tue, 10 Sep 2024 20:19:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726024755; x=1726629555; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uJPwsmBC4F7NqVNtstpFO65u7ZdAbfKLDANbg8Nf1aY=; b=jvtWcrCRJBulfnyZYdsMyIfcj/XQ4F8Paxz0JPXXb2nvxxCAFTs0cV99XPKhnYpdD2 qpCDUA0S3eY6cVGMzf+XLtxWrOdY1NG0AqPUoW6PYL7e10e5jTsxuBbxdB11Nj5DaU/h mGtxRE5K9USjr3CNrYHjoRXXBj7i5T7JE70Z+yleymYh/BZrqou0EuoZX/x7mugwvyrM tJZBWa66HuF2vsMQGmWWJRg4rRmYlJksl2FrFqS4fGNo7wQY0/kVeSeNRQ2jWcAnBYCR mdCkzPxyNsjWPSrCaMwko1d78Bdwf9p9hFOcnO6OvVN6QJjhqm3Bj2Mo2uwJvQvkd9lT KF7w== X-Gm-Message-State: AOJu0YzWfZln6Pj/rcO/2iOr6cOrjlchrnkpbRD3gN1C8PChHswubY0a Nh/Ag4Snwm7OmkUNRF6b8G3ZQaHVArKvoQBsW6thjt0sEHcOv0uXVdFY0T8SWFdXWWTYKRpMWwk uk0wBAH76hToVGi/viuFRmkzivaYQ0laxdQexyE9aXOwNmc7SoC+jJNS3fcgoRuQKSfkxUvPfbU ZfzGJq1Of/cQ== X-Received: by 2002:a05:6a20:e609:b0:1cf:4ad8:83c3 with SMTP id adf61e73a8af0-1cf5e0303ddmr4917626637.2.1726024754700; Tue, 10 Sep 2024 20:19:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7WH/8QQUtL4MlmMqWoNBkuhg6br0jqMWaVikVN+8eqhdvje9iNOZJ45qWDZC/4459IGKK5A== X-Received: by 2002:a05:6a20:e609:b0:1cf:4ad8:83c3 with SMTP id adf61e73a8af0-1cf5e0303ddmr4917598637.2.1726024754304; Tue, 10 Sep 2024 20:19:14 -0700 (PDT) Received: from localhost.localdomain ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d823cf3cefsm5399903a12.32.2024.09.10.20.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:19:13 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH v3 5/6] cpufreq: intel_pstate: Use Meteor Lake EPPs for Arrow Lake Date: Wed, 11 Sep 2024 00:15:51 -0300 Message-ID: <20240911031901.3907840-6-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911031901.3907840-1-pedro.kopper@canonical.com> References: <20240911031901.3907840-1-pedro.kopper@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Srinivas Pandruvada BugLink: https://bugs.launchpad.net/bugs/2077470 Use the same default EPPs as Meteor Lake generation. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki (cherry picked from commit e2ae7893b716b598b07169762f619a7e6c1d4fa9) Signed-off-by: Pedro Henrique Kopper --- drivers/cpufreq/intel_pstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 478507f40acb..6c01bae2d3ae 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3431,6 +3431,8 @@ static const struct x86_cpu_id intel_epp_default[] = { X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), X86_MATCH_VFM(INTEL_METEORLAKE_L, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, 179, 64, 16)), + X86_MATCH_VFM(INTEL_ARROWLAKE, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, + 179, 64, 16)), {} }; From patchwork Wed Sep 11 03:15:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Henrique Kopper X-Patchwork-Id: 1983615 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X3Qlz4qPZz1y1y for ; Wed, 11 Sep 2024 13:19:27 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1soDt2-00055i-0o; Wed, 11 Sep 2024 03:19:20 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1soDt0-00052T-57 for kernel-team@lists.ubuntu.com; Wed, 11 Sep 2024 03:19:18 +0000 Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id EFE123F20C for ; Wed, 11 Sep 2024 03:19:17 +0000 (UTC) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-718d5737df6so6742060b3a.0 for ; Tue, 10 Sep 2024 20:19:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726024756; x=1726629556; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L/C8QfWRMRwfRX7eVVgSKGmknX2WLm1vlPQizgNboLo=; b=v2+kNdAeVodwnLAcM/9l9sTT93ko2pabmOesp9D38e+l5XM4Rk32XhWLIv3SqzQnkb WSSQ+/rAfRTUcfW5X14dLhjImEF79s5GVRCVZtQSWoGjqT45k0vB85gNH2R0SCIuqPO1 2JlbWFZzMy/xHJimlHXspKgPW7PuBZnswPL/6AjY2zpAyw4upbRXTomPNoKBbykqy+0G uHYDy5vwjoLTct61pkpqUJKm2wtLmll+YVm1uHCZLmGkmNg5CBO8LwfPaYMXmc0yFHdh A8jeW3Ce8rDn+hEnDkm+lDvbGNkE9c32TNJlKQjh1d5NAtGI1bvp0/YSf4fpEgZ5baO4 cHiA== X-Gm-Message-State: AOJu0Ywt6+OmiUOGa0A//HEbSR2BpzjxYZQKmsxerXyRQgQ14QKjllS3 MpX1kAk8uCCGmAY/QSnmGOjGbJfA9ivQ1xdeU2/5oguBbpZeawVnZwMKPuWib0Qc3PP+mxsbYbX 8w63vDfAjKtuIX6CzBYbaWsD3FgTmj7u3o0LgTV7mzPmCZrZJ7yHcKS6JoN+rDHDuOxZj1A0yuU o+Uhs8Te57Ig== X-Received: by 2002:a05:6a00:b87:b0:70d:21d9:e2ae with SMTP id d2e1a72fcca58-718d5deec8fmr24289716b3a.6.1726024756379; Tue, 10 Sep 2024 20:19:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkCqUUtbRqszX+AzSFUZJFP/1TT3+eJNEjPGU7aB0KKCqWkto0NgSr7rA9v5/4QCbiasqZNQ== X-Received: by 2002:a05:6a00:b87:b0:70d:21d9:e2ae with SMTP id d2e1a72fcca58-718d5deec8fmr24289684b3a.6.1726024755880; Tue, 10 Sep 2024 20:19:15 -0700 (PDT) Received: from localhost.localdomain ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d823cf3cefsm5399903a12.32.2024.09.10.20.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:19:15 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH v3 6/6] cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids Date: Wed, 11 Sep 2024 00:15:52 -0300 Message-ID: <20240911031901.3907840-7-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911031901.3907840-1-pedro.kopper@canonical.com> References: <20240911031901.3907840-1-pedro.kopper@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2077470 On Intel Emerald Rapids machines, we ship the Energy Performance Preference (EPP) default for balance_performance as 128. However, during an internal investigation together with Intel, we have determined that 32 is a more suitable value. This leads to significant improvements in both performance and energy: POV-Ray: 32% faster | 12% less energy OpenSSL: 12% faster | energy within 1% Build Linux Kernel: 29% faster | 18% less energy Therefore, we should move the default EPP for balance_performance to 32. This is in line with what has already been done for Sapphire Rapids. Signed-off-by: Pedro Henrique Kopper Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/Zqu6zjVMoiXwROBI@capivara Signed-off-by: Rafael J. Wysocki (cherry picked from commit 64a66f4a3c89b4602ee1e6cd23b28729fc4562b3) Signed-off-by: Pedro Henrique Kopper --- drivers/cpufreq/intel_pstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 6c01bae2d3ae..5dde71808981 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3429,6 +3429,7 @@ static const struct x86_cpu_id intel_epp_default[] = { */ X86_MATCH_VFM(INTEL_ALDERLAKE_L, HWP_SET_DEF_BALANCE_PERF_EPP(102)), X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), + X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, HWP_SET_DEF_BALANCE_PERF_EPP(32)), X86_MATCH_VFM(INTEL_METEORLAKE_L, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE, 179, 64, 16)), X86_MATCH_VFM(INTEL_ARROWLAKE, HWP_SET_EPP_VALUES(HWP_EPP_POWERSAVE,