From nobody Sun Apr 12 19:14:38 2026 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fv0bL268Gz6YYQ2 for ; Sun, 12 Apr 2026 19:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fv0bL17Grz3lk0 for ; Sun, 12 Apr 2026 19:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776021278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ntr3o6BR0jmVU7F4KfOfJ0mIyc1HDZpGse7pjEyFUiA=; b=RjKU2HpQslOn4kfXnkzI4iBnPoAjVRe6rMqB75KdC9mSJ1HMHw8WSTJGdjSVHAf05Yf4/B rSRaUc2o0KsEcwoqKrd0x/N5OcHmHMrp1s3cC2ODUN6R43AyYu1Qq6c5kjk41TX2pQeG08 SQxBtA35AXJcdrAnWrv8+kN7xlHsaJ2qn/gxPu9Uj3yFbLEpJC2YexknhMJOyKk/lSv052 h5yLkn6F05n6lQfNvDm8BswquTcD7pfsyRId+ucWZ1vLNRLIgzbrN3gEfwOnTp2Lkvjs1G njKVHxEA8sbKRdNjZl2mJqfun8Jc27SNDrCcKRhSQkPs76ag1HZpGHNXuofa1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776021278; a=rsa-sha256; cv=none; b=iFjHC0h2uS9NdvCbFrov0cPYY5R9Pqdlr4WPpTFiaayNQA/XijnwPcaAWnpF2DQkOmhI+9 F85jRn5QLZiPt6lrB4QAv8DQz+m4dJ1r7glTkxnGwSXkLh+NY2Mq3eEqldFwmjnV5fBR6c mVrXhEHk93FmyyFkw4O28HHCJkqcEaVJ1/PSl0D/g1AS8dI10Z0UsAk0rJ5x/Kby9GqZz+ lkAw5E/wJFfMaRW7wvTYy3Dp+IFs+Xl4InOKuVSrC8HjNWlaW+ptmsd/YPyP/3b0gdtJDA rwJp6fp1uCD0oQ1D2yHUwKHOivhiQUABNZFARGQXNmqca6QaYOCVuQR0/o1kuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776021278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ntr3o6BR0jmVU7F4KfOfJ0mIyc1HDZpGse7pjEyFUiA=; b=fVTyBM8lwmGE/vS9NnBDmZEVWYcNW5Absn4Dmd2hd1pWge676p5B560jxdBj1Kl9JVXAta SrIyQI/LURNYMCfJa5OAPjt47P0P6xx2r5QjuU9QbOFymwLdaHiZHpOfG7jGHyJCh1CHyf NtsIWzfWOg8ym8jC/EUqNIGq418tvgHmSJ6Ombafj55Irlpgscq0qht16xvoqgutFPZERV BG7llHhxtthnqFYHZ8xl56SC0ZPWBVkFkWMjSdnPnCiw8fOl2xeXBePP83MbVU0ZgwhvHV T0WkTMho+Ym8Srxa0CZvkl6kXI24UnJmRQD4+/LoKMMMZWXV/aShL8UBrEOKUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fv0bL0WxnzVlR for ; Sun, 12 Apr 2026 19:14:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e1c0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 19:14:38 +0000 To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Olivier Certner Subject: git: 0771c02232 - main - Status/2026Q1/cppc.adoc: Add report List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0771c0223246c9d535601c99a435a3f7199a6c45 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 19:14:38 +0000 Message-Id: <69dbef1e.3e1c0.699ef893@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/doc/commit/?id=0771c0223246c9d535601c99a435a3f7199a6c45 commit 0771c0223246c9d535601c99a435a3f7199a6c45 Author: Olivier Certner AuthorDate: 2026-04-08 20:15:27 +0000 Commit: Olivier Certner CommitDate: 2026-04-12 19:10:56 +0000 Status/2026Q1/cppc.adoc: Add report Reviewed by: aokblast, salvadore Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56320 --- .../en/status/report-2026-01-2026-03/cppc.adoc | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/website/content/en/status/report-2026-01-2026-03/cppc.adoc b/website/content/en/status/report-2026-01-2026-03/cppc.adoc new file mode 100644 index 0000000000..970b2fcb86 --- /dev/null +++ b/website/content/en/status/report-2026-01-2026-03/cppc.adoc @@ -0,0 +1,41 @@ +=== Collaborative Processor Performance Control (CPPC) + +Contact: ShengYi Hung + +Contact: Olivier Certner + +Collaborative Processor Performance Control (CPPC) is a standard introduced by ACPI to allow the OS to manage performance and, conversely, efficiency levels of CPUs thanks to an abstract performance scale in general uncorrelated to and more fine-grained than mere frequency levels. +Intel and AMD have been providing CPU implementations in support of ACPI CPPC for several years now. + +FreeBSD had been supporting enabling CPPC but only for Intel processors and allowing to manage a useful but very limited subset of its functionality, thanks to the man:hwpstate_intel[4] driver added in 2020. +Hardware autonomous selection of the performance target depending on the workload is forcibly enabled, and only the main corresponding hardware tunable, called Efficiency/Performance Preference (EPP), is exported to the administrator via a man:sysctl[8] knob. + +We have added support for AMD CPPC's implementation in the existing man:hwpstate_amd[4] driver which, contrary to man:hwpstate_intel[4], so far managed only "regular" P-states. +The driver exports 4 man:sysctl[8] knobs: Minimum performance, maximum performance, desired performance and EPP. +Minimum, maximum and desired performances are values between 0 and 255, but only a sub-range may have an effect depending on the hardware. +Initial values of minimum and maximum performances are set to the effective sub-range bounds as instructed by the platform (if available). +The EPP control serves to express a bias towards efficiency or performance, and is a value between 0 (maximum performance preference) and 255 (maximum efficiency preference). +The desired performance may be set to any value between minimum and maximum performance, or to the special value 0 to enable hardware autonomous selection of target performance by the hardware depending on the current workload. +The minimum performance, maximum performance and EPP controls apply regardless of whether autonomous selection is enabled or a specific desired performance specified. +Note that the effect of each combination of these values depend on the CPU model, and we have already been able to observe wildly different behaviors on a few ones. +Therefore, you should expect to have to experiment to find the values adapted to your use cases on a given machine. + +man:hwpstate_amd[4] is included by the `GENERIC` kernel (through man:cpufreq[4]) and uses CPPC if the CPUs support it unless explicitly instructed otherwise (through the `machdep.hwpstate_amd_cppc_enable` tunable). +Consequently, in order to avoid performance regressions, for the time being we have decided to set the above-mentioned controls for maximum performance, as this is the default behavior for traditional P-state support and also that of any other man:cpufreq[4] driver except for man:hwpstate_intel[4] (which currently forces hardware autonomous selection and sets EPP to `0x80` (50%) by default). +This may be revised later depending on whether we can reliably determine if the running computer is a laptop. + +Next steps are: + +1. Modify man:hwpstate_intel[4] to be on par with man:hwpstate_amd[4]'s CPPC support in terms of functionality and default behavior. + This includes: + - Better error-handling and debugging output + - Exporting knobs for all the above-mentioned controls + - Change the scale of EPP (from percents to an 8-bit value) + - Change the default values +1. Write a manual page for man:hwpstate_amd[4] (in the meantime, the explanations here and the embedded man:sysctl[8] knobs' documentation should be enough). +1. Teach man:powerd[8] the CPPC control knobs and some simple policies on how to set them. +1. Teach man:cpufreq[4] about the abstract performance values, to provide a unified interface to retrieve or set them. +1. Make man:cpufreq[4] support per-CPU settings. +1. Select default control values based on the platform type (probably from ACPI's ``FADT``'s `Preferred_PM_Profile` field). +1. Possibly move man:powerd[8] policies to kernel space. + +Sponsor: The FreeBSD Foundation