From patchwork Wed Feb 22 06:45:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: srinivas pandruvada X-Patchwork-Id: 60352 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp422117wrd; Tue, 21 Feb 2023 22:49:54 -0800 (PST) X-Google-Smtp-Source: AK7set9UhqUii0Yh6mHTryiwqRg6onDIGd2vZesGi32pV16mzyS8PJ/5rVIa96zWcfz0cxpVkzN3 X-Received: by 2002:a17:90b:1b50:b0:234:1676:84f2 with SMTP id nv16-20020a17090b1b5000b00234167684f2mr9767312pjb.11.1677048593837; Tue, 21 Feb 2023 22:49:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677048593; cv=none; d=google.com; s=arc-20160816; b=E0gsFpsST4HAGip994BRunUI5cVFxlZQkZOB4BWMzoxUbOpv62McKBniPwqeHz1FdE 9KGtSzk2KK4pb6vjadyBEJEmksv772WA3fWa6uN8otnU3uUnOaC7a/zvp1Q4JBQXBEqW Y2fCigJeJJVsq4Gp3RZZnp9SdJ3+WmVFZpiBTre3vqa7ewXXcSqUbNWed3f7JsfNNBY4 2Oazml4qHqcE4obzLgsIKiaj4AN3/U4deujbYl/iwTk3aPPVIKSL5EB8XiHAlAdqoVl5 8HoNP1kwIhOZsBEKD2hRg42XVqf2MiNd9h70ELsEElXuqQrB1fKmuOkRzyGw+LZuGv8P vgEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=40JBO1UazicjlATXEpj3ToFzgQ754QomvrN8posSHFM=; b=xC2UYEc+5Gfm1hq6winNCVBCLgpx03jmi1/3EvJkVYcuKZH5YXCoTxxzkeu9ExF6TL GG3vIVBlrCHptWnsgemVKLp5aHznq/D0EzrBrVN/yr/S4qrC98TpL81Li/8WSCn8TGob hR4wG/NczPmL0qmLWYvTlBTAWbh1sQFHg6mQb3FXiImqi+ml8jD++Nl9QsoVXaOoOwRh 922sK4PL2iDVSpcnF9f5x8lkOj0VQ+7VxC7xHHBjhwgFio5xeAoCUN3avcpk+gDAIfpQ 3vcsyMD8eULnNP04yIU96aYXNL3s+Ce3CxPhG3ZlwEQUwic5EjOkSy/UjAwADepEbWeM dOgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="L+dn/F6k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mj22-20020a17090b369600b0022c09c603bdsi4420113pjb.118.2023.02.21.22.49.40; Tue, 21 Feb 2023 22:49:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="L+dn/F6k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbjBVGpq (ORCPT + 99 others); Wed, 22 Feb 2023 01:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjBVGpo (ORCPT ); Wed, 22 Feb 2023 01:45:44 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 116B52FCC7; Tue, 21 Feb 2023 22:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677048343; x=1708584343; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wuo0nIIgWAqQ8fcp0ROhiW2stx6q20Di4BWobm89vqI=; b=L+dn/F6kxHFoaWAS5oDrJjtxzO8K33iNcsuV1RWXKB5VY4QonoFk0b2S cY6Z306+s+y/PTsfFq8yQDsbYN/WDSy3l3sxGFf7GJYHFqPspZr68DtAF oFO+7CPv5ergbthpdV42GIP5jlGxurOyvB2NILlVmhLeQJifW06umVhr5 1fjEffj/wb9FymT01afPmSBCPLF+EsIgNWpfEoiG+Vw7xwz/6hf8s2lae JfNUzZfa7Y8QywuCAIyq44z2B9R4InsJIcJdxxY+k5/liy+AoeJydt10u Pqnuf2qLxvw9cJMLbKX4boMJS+/bf1FwvROnUM3EmlEQnflvJjaaNFD6+ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10628"; a="419078505" X-IronPort-AV: E=Sophos;i="5.97,318,1669104000"; d="scan'208";a="419078505" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2023 22:45:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10628"; a="760838132" X-IronPort-AV: E=Sophos;i="5.97,318,1669104000"; d="scan'208";a="760838132" Received: from spandruv-desk.jf.intel.com ([10.54.75.8]) by FMSMGA003.fm.intel.com with ESMTP; 21 Feb 2023 22:45:37 -0800 From: Srinivas Pandruvada To: rafael@kernel.org, lenb@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Pandruvada Subject: [PATCH] cpufreq: intel_pstate: Update Balance performance EPP for Sapphire Rapids Date: Tue, 21 Feb 2023 22:45:26 -0800 Message-Id: <20230222064526.1971688-1-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758512906082418578?= X-GMAIL-MSGID: =?utf-8?q?1758512906082418578?= While majority of server OS distributions are deployed with performance governor as the default, some distributions like Ubuntu uses powersave governor as the default. While the powersave governor has much lower power, the performance is lower than +25% for several workloads compared to performance governor. One report is published by www.Phoronix.com showing difference of 37%. The goal here is to keep mean performance delta of powersave governor from performance governor around 10% to 12% by running wide variety of server workloads. For some bursty workload, this delta can be still large, as ramp up of frequency will still lag with powersave governor irrespective of EPP setting. The performance governor always requests maximum frequency. Based on experiments, EPP of 0x00, 0x10, 0x20, the performance delta for powersave governor is around 12%. But the EPP 0x20 has 18% lower average power. Also experimets are done by raising intel_pstate sysfs min_perf_pct as high as 50%. This didn't bring in any additional improvements compared to just changing EPP. From the Alder Lake processor generation, intel_pstate driver has capability to update EPP for the default balance_performance based on the CPU model. Use the same method to update the default balance_performance EPP for the Sapphire Rapids processor to 0x20. Link: https://www.phoronix.com/review/centos-clear-spr/6 Signed-off-by: Srinivas Pandruvada --- 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 fd73d6d2b808..32a4004d155d 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3372,6 +3372,7 @@ static const struct x86_cpu_id intel_epp_balance_perf[] = { * AlderLake Mobile CPUs. */ X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, 102), + X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, 32), {} };