Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2023 13:42:22 GMT
From:      Andrew Gallatin <gallatin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: fd96685a4a57 - main - Revert "When stopping powerd, set the CPU frequency back to its maximum value"
Message-ID:  <202305251342.34PDgMgT096211@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=fd96685a4a579fc84031e8e66d8f8b1ce8cdf1e5

commit fd96685a4a579fc84031e8e66d8f8b1ce8cdf1e5
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2023-05-22 00:47:28 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2023-05-25 13:40:26 +0000

    Revert "When stopping powerd, set the CPU frequency back to its maximum value"
    
    This reverts commit 1dcb6ad173e57b489a859ea59ed6eaa733bdb5bc.
    
    As of "8cb16fdbea6b Restore original frequency on exit.", powerd
    restores the original frequency itself.
    
    Further, if the original frequency is not the same as the
    first frequency found in the frequency list, then the restoration
    done by the powerd_poststop will restore the wrong frequency.
    This can happen on Intel machines where Turbo is not enabled,
    but the turbo frequency is first in the list of frequencies.
    In this case, turbo will be enabled when the user did not want
    it to be.
    
    Sponsored by: Netflix
    Differential Revision: https://reviews.freebsd.org/D40197
    Reviewed by: imp, mav
---
 libexec/rc/rc.d/powerd | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/libexec/rc/rc.d/powerd b/libexec/rc/rc.d/powerd
index 2fc783a627e9..6f63bb96ff42 100755
--- a/libexec/rc/rc.d/powerd
+++ b/libexec/rc/rc.d/powerd
@@ -14,13 +14,6 @@ name="powerd"
 desc="Modify the power profile based on AC line state"
 rcvar="powerd_enable"
 command="/usr/sbin/${name}"
-stop_postcmd=powerd_poststop
-
-powerd_poststop()
-{
-	sysctl dev.cpu.0.freq=`sysctl -n dev.cpu.0.freq_levels |
-	    sed -e 's:/.*::'` > /dev/null
-}
 
 load_rc_config $name
 run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305251342.34PDgMgT096211>