From patchwork Wed Aug 28 19:41:43 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: 1978042 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 4WvFHP6FGnz1yfy for ; Thu, 29 Aug 2024 05:44:49 +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 1sjOav-0007CF-6U; Wed, 28 Aug 2024 19:44:41 +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 1sjOas-0007Ap-01 for kernel-team@lists.ubuntu.com; Wed, 28 Aug 2024 19:44:38 +0000 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (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 B544F3F297 for ; Wed, 28 Aug 2024 19:44:37 +0000 (UTC) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-715cfa35da2so1325599b3a.0 for ; Wed, 28 Aug 2024 12:44:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724874276; x=1725479076; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tswKdhcbnWgP52cHBAy1Q8qPANnOJR9tA2rRH32PHps=; b=iivmVnR/d+JmUo5Oq3NOddOBNEezfRq6vd63AImkvU0VDXP9T1QmB2ZAClGwkUPcD1 4ytfc199nmFimwLWJhQ8FEZbGLFZcHFPelG7f6Uuo2lHxu0ewCzjywfeo/DInUMRgW1I 7oBLcVrzpXE6m1XkWN9G6JybvgQ5GteGsJJzEtazqD4KUoVwNzk6wd5yEX0y2mvm8iaz Ntu9f7t64gX4FJwBLrwYVmRVlwafeaWLHvhuSY36hLYi+zUfIM82/BMeejxiQW777Uc8 dMTIShgX5yCWDEQcBACFsNfRfKJrkA4tMz5C3+8d2rG9jiH5LykW3TgPLaxAo57pZaGv oBGA== X-Gm-Message-State: AOJu0Yx57Ff+0zhM2cmOR1waxno8VaU0HbwMZApJLn5Tl7N6JBuE4O4a WX/9LuQ7bsynK4XSIU9RRfG0WoZR9Xjx4XnPrqgbpkbKam4xP9sHgHMCvMlUFwfRvVp+OMBaOIv AR7vsjGfH/qoN8djPNmPe9KAoWiAFQradHozthLPR7RvQdaUNm4CaMMadQ4Oj95J5K8uO5Mec57 9G2bDPVW8EQQ== X-Received: by 2002:a05:6a21:9688:b0:1ca:cccd:4a1b with SMTP id adf61e73a8af0-1cce10fe303mr437954637.45.1724874276187; Wed, 28 Aug 2024 12:44:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkLztvLbOloM8ZgpgtadNW95GGVllLuGE7pjPNTiLpG/KXCZO+XEBz20E1xt6Tpe9X2dmQ5Q== X-Received: by 2002:a05:6a21:9688:b0:1ca:cccd:4a1b with SMTP id adf61e73a8af0-1cce10fe303mr437928637.45.1724874275585; Wed, 28 Aug 2024 12:44:35 -0700 (PDT) Received: from capivara.cloud ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434253dbesm10485974b3a.76.2024.08.28.12.44.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:44:35 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/5] cpufreq: intel_pstate: Allow model specific EPPs Date: Wed, 28 Aug 2024 16:41:43 -0300 Message-ID: <20240828194431.1737399-2-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240828194431.1737399-1-pedro.kopper@canonical.com> References: <20240828194431.1737399-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 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 --- 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 Aug 28 19:41:44 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: 1978041 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 4WvFHP0QMSz1yg0 for ; Thu, 29 Aug 2024 05:44:48 +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 1sjOav-0007DC-MH; Wed, 28 Aug 2024 19:44:41 +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 1sjOat-0007BD-Ce for kernel-team@lists.ubuntu.com; Wed, 28 Aug 2024 19:44:39 +0000 Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) (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 20D703F2F2 for ; Wed, 28 Aug 2024 19:44:39 +0000 (UTC) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-5e4df21f22dso840900a12.0 for ; Wed, 28 Aug 2024 12:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724874277; x=1725479077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t7SOsZDwDjE2S97PQr8nPyR+LhtMkATYGHzqX9Ajcms=; b=n0KvgpWBTD0cB5dk26dq1bv2rpUiBQQMNTpQoW66fgO5RExvIb/6S/PhaMQ2cG0PIE aRZlwTPsyHj4bfWy9oTNTKylpdVsNNzabHvjvSWn/I5XCtN3pyVw+Fh1uGUJ47wjnoqt XoBoRFm/rD4MSYlULrie+HR+D6pTMJNA0wweTiHMeZoCHf8U1XUliDsoCtxEjBt7Mi0Q KHGPd4HUfFmjEINi33hyP/XQZrXvHmUJge1QKK+UPBRcqvRTbqsv2fh/AU6SvpVF4LTH dmmfiT7mxxd5fqjj0CWAamc/XnHf+s/4e92cIG9Xt8ivr1BchgXyfkbvwIEuLLpYc9F4 7R2Q== X-Gm-Message-State: AOJu0YwVAAASCo4UBVmMZWGX92YYNwj0g2HHJaTX/sTsrviuGGH9eRLm yDcJvA8XTNjeyVwPXX1mEWMFDTx4c152XY/PJWssvdQSZHCpFWouL17Ar6V7cLrAaPsDk/FLK9+ mbeNsUYy2OkXmoe7jIvEALMflZw3kOV+SUPyiocondDxHTtyL2SBsrql8LFaztIFg3K8MRUPtl5 wOOSdD0K8BBg== X-Received: by 2002:a05:6a21:e8a:b0:1cc:dcc9:9549 with SMTP id adf61e73a8af0-1cce162b3a7mr441578637.13.1724874277583; Wed, 28 Aug 2024 12:44:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRMuJAZyE08mPlNH2sb6ZXu5Jrm/+YrXcjebHFFkdV9flEhhSiEZ8i3kka/AWPTxWk49al6Q== X-Received: by 2002:a05:6a21:e8a:b0:1cc:dcc9:9549 with SMTP id adf61e73a8af0-1cce162b3a7mr441532637.13.1724874276984; Wed, 28 Aug 2024 12:44:36 -0700 (PDT) Received: from capivara.cloud ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434253dbesm10485974b3a.76.2024.08.28.12.44.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:44:36 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/5] cpufreq: intel_pstate: Update default EPPs for Meteor Lake Date: Wed, 28 Aug 2024 16:41:44 -0300 Message-ID: <20240828194431.1737399-3-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240828194431.1737399-1-pedro.kopper@canonical.com> References: <20240828194431.1737399-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 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 --- 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 Aug 28 19:41:45 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: 1978043 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 4WvFHR4bm1z1yfy for ; Thu, 29 Aug 2024 05:44:51 +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 1sjOax-0007EP-B5; Wed, 28 Aug 2024 19:44:43 +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 1sjOau-0007Br-M0 for kernel-team@lists.ubuntu.com; Wed, 28 Aug 2024 19:44:40 +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 734AB3F297 for ; Wed, 28 Aug 2024 19:44:40 +0000 (UTC) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-714484a692dso855690b3a.1 for ; Wed, 28 Aug 2024 12:44:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724874279; x=1725479079; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7K8tGy6dWb1Ty1QLr9QZWZrrv+FV/J01tplBSfZ0jxg=; b=MBktvA5XWQL4I6GjIMnEG9Gd+GhurGEQx5XHxen14OPrGzCgIP33wC1HYJWdO4MzYz 1UuWYUGvGkR0ZvIZ7BUi7SElUcJYRmqu3I0w8Y+eo4Nhv2hiPkHpZCbIkAXEzvwKZ8Jt 3bDBFPETydu/vuwluLfSI6JGwIN3QSMBFmhSwvAfyNtl85cMrYhEiylyp9bngQzmIDUS vrAk7zillE72nqyI9Sf7emAHFPZ0a/10dbWJ/HJfE0N79TKbn4RtTr5CHjLZL37l0AEZ 5Yu89pUAPLffKoc4qDVTlf1IyfBKZA7f8R+ite1UhHzkp1LHipxGss3hLdJfVUsyArdn nQrg== X-Gm-Message-State: AOJu0YxjMM6BC2bhxcqriR0gApdiC2i7lwdUyQxrBodriFs+iZgDiu5m nxFzXvgRaV/TT+bUt8aSA8S57G+jJzTnGfVipI0z2mY4hcqDW7s4kBvzj6iPlD564PrauGyPS6T rlYxnnajStKrgTOeMCOl4bh/5ayMOd2bu2bmdKUUXdAygZrfaj8bebEXhsxcJrYJYy9oltnFWB8 TQFXz+QkSQHQ== X-Received: by 2002:a05:6a20:6a11:b0:1c6:b0cc:c44b with SMTP id adf61e73a8af0-1cce16968b5mr346124637.19.1724874278835; Wed, 28 Aug 2024 12:44:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEs+UO5Yv8NgtRrYKCHPwQZCNTMTNHdmbbxDUVZIMh+geVaYc1r1ejtqVXLjojFz1U8Fu+/eA== X-Received: by 2002:a05:6a20:6a11:b0:1c6:b0cc:c44b with SMTP id adf61e73a8af0-1cce16968b5mr346097637.19.1724874278305; Wed, 28 Aug 2024 12:44:38 -0700 (PDT) Received: from capivara.cloud ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434253dbesm10485974b3a.76.2024.08.28.12.44.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:44:38 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/5] cpufreq: intel_pstate: Update Meteor Lake EPPs Date: Wed, 28 Aug 2024 16:41:45 -0300 Message-ID: <20240828194431.1737399-4-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240828194431.1737399-1-pedro.kopper@canonical.com> References: <20240828194431.1737399-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 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 --- drivers/cpufreq/intel_pstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 18ba78cdf6ed..0c52fe2ef310 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3429,10 +3429,10 @@ 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, + 179, 64, 16)), {} }; From patchwork Wed Aug 28 19:41:46 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: 1978044 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 4WvFHT0Z0Pz1yfy for ; Thu, 29 Aug 2024 05:44:53 +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 1sjOaz-0007H4-JW; Wed, 28 Aug 2024 19:44:45 +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 1sjOaw-0007Dh-6d for kernel-team@lists.ubuntu.com; Wed, 28 Aug 2024 19:44:42 +0000 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (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 C747C3F297 for ; Wed, 28 Aug 2024 19:44:41 +0000 (UTC) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-7141bd43574so6481113b3a.2 for ; Wed, 28 Aug 2024 12:44:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724874280; x=1725479080; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DhP5DwJo+vDc8yBLFwYZW0KqV1ZNRz0mawncKWLe8H4=; b=BNpGwHOmOGyehgT7HJk5jlh1ajQYkwHJEqnrX+Z2Cfg2nNwJy48OmMXONmh3nCiorE W/zCrdvQyxLI3AwclYywME6vqziyJ5IBLsgYT0QrXkxbwS22wlfHOncyFcdEPZXjEkhu o6h6oGEwEq/oUB/yWNJwSVfL8F2VVkVXsA9/qphOvGzYAOiGJmA80VPb30s/sE5cNuP7 hxRKaacfuCjxi7fuRd1JxQzpKgk9qZGm9C0DWVc5zsfcz2rDfcfL8Lypnep7K2X/gkI3 LlDjPj1c5qu8AeWAu/5aLQk91U4xG02Nc++gMFp/Ax8TK80BEH+PhNJgwNlmRYzrSmq0 rPlQ== X-Gm-Message-State: AOJu0Yy+zWOB1fNKYiOMjZbW493+FgYzU7gcdiVImmsvwqqKQ8KG1tQx 9QpxvxBh/51mHEIrAoVzsqPbJEcdXiGO2eCujw7CbvphDFkNVln/c+RFc4WuMrcmYzNj4RKKyHm EICOKK6LA6OFqoPsGFPm3MVGxhHAQI2z8uJROW7wtur8+zbV2bdnYGy1wgon/6MqYm6frdRWV6b 6kaZBNeyZtqA== X-Received: by 2002:a05:6a21:3489:b0:1c2:8af6:31c2 with SMTP id adf61e73a8af0-1cce10e1fc0mr423459637.44.1724874280159; Wed, 28 Aug 2024 12:44:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAT4/Dcxbkvl0XbZZFZaK+hf4b9J93aw2w0jOwQQ/MZk+RB+2MQTKGl2wTmK4j0ys5jAAKqg== X-Received: by 2002:a05:6a21:3489:b0:1c2:8af6:31c2 with SMTP id adf61e73a8af0-1cce10e1fc0mr423438637.44.1724874279725; Wed, 28 Aug 2024 12:44:39 -0700 (PDT) Received: from capivara.cloud ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434253dbesm10485974b3a.76.2024.08.28.12.44.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:44:39 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/5] cpufreq: intel_pstate: Use Meteor Lake EPPs for Arrow Lake Date: Wed, 28 Aug 2024 16:41:46 -0300 Message-ID: <20240828194431.1737399-5-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240828194431.1737399-1-pedro.kopper@canonical.com> References: <20240828194431.1737399-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 Use the same default EPPs as Meteor Lake generation. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki --- 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 0c52fe2ef310..051a3294581b 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3433,6 +3433,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 Aug 28 19:41: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: 1978045 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 4WvFHV4Wsqz1yfy for ; Thu, 29 Aug 2024 05:44:54 +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 1sjOb0-0007IY-Ry; Wed, 28 Aug 2024 19:44:46 +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 1sjOax-0007EX-IL for kernel-team@lists.ubuntu.com; Wed, 28 Aug 2024 19:44:43 +0000 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.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-0.canonical.com (Postfix) with ESMTPS id 17A193F297 for ; Wed, 28 Aug 2024 19:44:43 +0000 (UTC) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-71439227092so7589545b3a.3 for ; Wed, 28 Aug 2024 12:44:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724874281; x=1725479081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xuuii4Z+/0YxdT13nDX5nzRE8Vg/2uL6kJ1C88DWXYc=; b=uaEkXatv0c7wSqUNgloUg6K+aGghGfm1PQznaSMzWm7vSfAwJOx+iRssTNNIkEnd71 +3V+YsyfahagBbThLVNHtAEBpCz+hmvwn1xrWaLBmiAi9Wq4zLc1fnjg7OoHDaQrQxOx fQ1Uix3WKMXrXb05AtZvtxVvWaRD5TSjXZWDvqwJailXq8RJfDnotwjL1Rc2gpduqUtL WcDwI6NNkdkkUsUFoHvzV2dcfa4DUwgrW3jxsNTwv+xKy5hDkE9S0w95cQthyDyBYb70 QN8lxJxN3/Jg+gDdXVTzYZaxG8N3m4Lhka+NQ0IrXIDtY4wfNslbw3UkemGus9uBan2z Xdsg== X-Gm-Message-State: AOJu0Yz3b401vNEsyg6BM9djFag48/FAAlMFsmbBiPUnaNmlTcmKksoS 6PZJ6RGrAlcFTyFjszVWAE5xBGC+eV63JXVijoLubEhs5yHmOPPpdh1Afwe4glieoehWiQceKDA C3pLYfM21ewN3XYPLJJgyJMEGpSi0dWlFdub+r2VG0iOz2rgsmMFdtyo/6Xq4pDjY43QT8u5bOL bLLEfqqz6Klw== X-Received: by 2002:a05:6a21:164a:b0:1c3:acd1:5cdd with SMTP id adf61e73a8af0-1cce1125b2emr411093637.47.1724874281534; Wed, 28 Aug 2024 12:44:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4yRQIZmwDzmMZ1smYTYPNeOeh3FvOY6nuSlY+4+76nTJnc3/7ef+YIWCcf9vZyzEfgt2hPA== X-Received: by 2002:a05:6a21:164a:b0:1c3:acd1:5cdd with SMTP id adf61e73a8af0-1cce1125b2emr411068637.47.1724874281020; Wed, 28 Aug 2024 12:44:41 -0700 (PDT) Received: from capivara.cloud ([186.250.11.100]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434253dbesm10485974b3a.76.2024.08.28.12.44.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:44:40 -0700 (PDT) From: Pedro Henrique Kopper To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/5] cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids Date: Wed, 28 Aug 2024 16:41:47 -0300 Message-ID: <20240828194431.1737399-6-pedro.kopper@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240828194431.1737399-1-pedro.kopper@canonical.com> References: <20240828194431.1737399-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" 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 --- 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 051a3294581b..13b035469844 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3431,6 +3431,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,