From: Sumit Gupta <sumitg@nvidia.com>
To: <rafael@kernel.org>, <viresh.kumar@linaro.org>, <lenb@kernel.org>,
<robert.moore@intel.com>, <corbet@lwn.net>,
<pierre.gondois@arm.com>, <zhenglifeng1@huawei.com>,
<rdunlap@infradead.org>, <ray.huang@amd.com>,
<gautham.shenoy@amd.com>, <mario.limonciello@amd.com>,
<perry.yuan@amd.com>, <ionela.voinescu@arm.com>,
<zhanjie9@hisilicon.com>, <linux-pm@vger.kernel.org>,
<linux-acpi@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<acpica-devel@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Cc: <linux-tegra@vger.kernel.org>, <treding@nvidia.com>,
<jonathanh@nvidia.com>, <vsethi@nvidia.com>,
<ksitaraman@nvidia.com>, <sanjayc@nvidia.com>,
<nhartman@nvidia.com>, <bbasu@nvidia.com>, <sumitg@nvidia.com>
Subject: [PATCH v5 00/11] Enhanced autonomous selection and improvements
Date: Tue, 23 Dec 2025 17:42:56 +0530 [thread overview]
Message-ID: <20251223121307.711773-1-sumitg@nvidia.com> (raw)
This patch series enhances the ACPI CPPC CPUFREQ driver with
comprehensive support for autonomous performance selection, expanded
runtime control interfaces and improvements.
CPPC autonomous mode (auto_sel) enables hardware-driven CPU performance
scaling using Energy Performance Preference (EPP) hints, without OS
governor intervention. Currently, there's limited runtime control and
visibility into CPPC performance registers when using autonomous mode.
This series addresses these gaps by:
1. Exposing min_perf/max_perf registers via sysfs (as frequency in kHz)
to allow fine-grained performance bounds control in autonomous mode.
2. Exposing perf_limited register to detect and clear throttling events.
3. Keeping policy limits synchronized with hardware registers to ensure
consistent behavior between HW state and userspace view.
4. Providing boot parameter for system-wide autonomous mode enablement.
It also includes code improvements: generic sysfs helpers, struct
cleanup, new APIs for reading performance controls, and extended
epp_perf support.
The patches are grouped as below:
- Patch 1: Generic sysfs helpers. Refactoring, independent.
- Patch 2, 3 & 4: Improvements. Can be applied independently.
- Patch 5: ACPI APIs and sysfs for min/max_perf. Independent.
- Patch 6: ACPI APIs and sysfs for perf_limited. Independent.
- Patch 7: Add ABI documentation. Depends on Patch 5 and 6.
- Patch 8: Sync policy when min/max_perf updated. Depends on Patch 5.
- Patch 9: Sync policy when toggling auto_select. Depends on Patch 8.
- Patch 10: Make scaling_min/max_freq read-only. Depends on Patch 9.
- Patch 11: Boot parameter support. Depends on Patch 9.
Patches 1-7 can be applied first if they are Ok.
---
v4[4] -> v5:
- patch2: new patch to clean up cppc_perf_caps and cppc_perf_ctrls.
- patch3: moved cppc_get_perf() call from v4's patch8 to here.
- patch5: fix ABI documentation format (kernel test robot report).
- patch6: update perf_limited logic to only allow clearing set bits.
- patch8: new patch to sync policy limits when updating min/max_perf,
update_policy parameter moved from v4's patch5.
- patch9: refactored from v4's patch7, added update_reg parameter,
handle -EOPNOTSUPP for auto_sel (platforms with fixed auto_sel).
- patch10: new to make scaling_min/max_freq read-only in auto_sel mode.
- patch11 (v4's patch8): moved boot param handling to cpu_init,
handle -EOPNOTSUPP for EPP (platforms without EPP support).
- general code improvements, kernel-doc updates, reduced redundancies.
[4] has detailed changelog of previous versions.
Sumit Gupta (11):
cpufreq: CPPC: Add generic helpers for sysfs show/store
ACPI: CPPC: Clean up cppc_perf_caps and cppc_perf_ctrls structs
ACPI: CPPC: Add cppc_get_perf() API to read performance controls
ACPI: CPPC: Extend cppc_set_epp_perf() to support auto_sel and epp
ACPI: CPPC: add APIs and sysfs interface for min/max_perf
ACPI: CPPC: add APIs and sysfs interface for perf_limited
cpufreq: CPPC: Add sysfs for min/max_perf and perf_limited
cpufreq: CPPC: sync policy limits when updating min/max_perf
cpufreq: CPPC: sync policy limits when toggling auto_select
cpufreq: CPPC: make scaling_min/max_freq read-only when auto_sel
enabled
cpufreq: CPPC: add autonomous mode boot parameter support
.../ABI/testing/sysfs-devices-system-cpu | 42 ++
.../admin-guide/kernel-parameters.txt | 13 +
drivers/acpi/cppc_acpi.c | 214 ++++++++-
drivers/cpufreq/cppc_cpufreq.c | 434 ++++++++++++++++--
include/acpi/cppc_acpi.h | 46 +-
5 files changed, 712 insertions(+), 37 deletions(-)
[1] https://lore.kernel.org/lkml/20250211103737.447704-1-sumitg@nvidia.com/
[2] https://lore.kernel.org/lkml/20250823200121.1320197-1-sumitg@nvidia.com/
[3] https://lore.kernel.org/lkml/20251001150104.1275188-1-sumitg@nvidia.com/
[4] https://lore.kernel.org/lkml/20251105113844.4086250-1-sumitg@nvidia.com/
--
2.34.1
next reply other threads:[~2025-12-23 12:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 12:12 Sumit Gupta [this message]
2025-12-23 12:12 ` [PATCH v5 01/11] cpufreq: CPPC: Add generic helpers for sysfs show/store Sumit Gupta
2025-12-25 3:41 ` zhenglifeng (A)
2025-12-23 12:12 ` [PATCH v5 02/11] ACPI: CPPC: Clean up cppc_perf_caps and cppc_perf_ctrls structs Sumit Gupta
2025-12-23 12:12 ` [PATCH v5 03/11] ACPI: CPPC: Add cppc_get_perf() API to read performance controls Sumit Gupta
2025-12-25 8:21 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 04/11] ACPI: CPPC: Extend cppc_set_epp_perf() to support auto_sel and epp Sumit Gupta
2025-12-25 3:56 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 05/11] ACPI: CPPC: add APIs and sysfs interface for min/max_perf Sumit Gupta
2025-12-25 9:03 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 06/11] ACPI: CPPC: add APIs and sysfs interface for perf_limited Sumit Gupta
2025-12-25 12:06 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 07/11] cpufreq: CPPC: Add sysfs for min/max_perf and perf_limited Sumit Gupta
2025-12-24 18:32 ` kernel test robot
2025-12-26 0:20 ` Bagas Sanjaya
2025-12-23 12:13 ` [PATCH v5 08/11] cpufreq: CPPC: sync policy limits when updating min/max_perf Sumit Gupta
2025-12-25 13:56 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 09/11] cpufreq: CPPC: sync policy limits when toggling auto_select Sumit Gupta
2025-12-26 2:55 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 10/11] cpufreq: CPPC: make scaling_min/max_freq read-only when auto_sel enabled Sumit Gupta
2025-12-26 3:26 ` zhenglifeng (A)
2025-12-23 12:13 ` [PATCH v5 11/11] cpufreq: CPPC: add autonomous mode boot parameter support Sumit Gupta
2025-12-26 8:03 ` zhenglifeng (A)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251223121307.711773-1-sumitg@nvidia.com \
--to=sumitg@nvidia.com \
--cc=acpica-devel@lists.linux.dev \
--cc=bbasu@nvidia.com \
--cc=corbet@lwn.net \
--cc=gautham.shenoy@amd.com \
--cc=ionela.voinescu@arm.com \
--cc=jonathanh@nvidia.com \
--cc=ksitaraman@nvidia.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=nhartman@nvidia.com \
--cc=perry.yuan@amd.com \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=rdunlap@infradead.org \
--cc=robert.moore@intel.com \
--cc=sanjayc@nvidia.com \
--cc=treding@nvidia.com \
--cc=viresh.kumar@linaro.org \
--cc=vsethi@nvidia.com \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).