Configure cpufreq in power manager |
||||
Issue descriptionCurrently cpufreq is configured by laptop-mode-tools (LMT) for devices that need a non-default configuration. LMT will be retired ( Issue 214886 ), move the cpufreq configuration to power_manager. The current LMT configurations for cpufreq are static, they don't vary depending on whether the device runs on battery or AC. This means that cpufreq can be configured at boot time and there is no need to reconfigure it on power supply changes.
,
Jul 28 2017
Yes, configuration is trivial, a script should be fine. I'm doubting how to best launch it, an own 'service' seems overkill, powerd-pre-start.sh could be an option if that's not considered too hacky.
,
Jul 28 2017
powerd-pre-start.sh currently just does setup needed by powerd (making directories and changing permissions), so it's probably not the right place for this. I'd probably recommend just adding a trivial Upstart job in this case. https://chromium.googlesource.com/chromiumos/platform2/+/master/init/README offers some guidance. I think that "task" might be appropriate in this case. Are there concerns about when this runs in terms of the boot sequence? Like, do we need to worry about it adding more variability to boot times if it sometimes runs earlier or later?
,
Jul 28 2017
Thanks, let's use an upstart job then. If we want less variability in boot time we probably want to do the configuration late in the boot process, though it's hard to quantify how much difference it would actually make.
,
Jul 31 2017
> If we want less variability in boot time we probably want
> to do the configuration late in the boot process, though
> it's hard to quantify how much difference it would actually make.
If there's no hard deadline for running the job, then the
following will make the job run at boot without affecting
boot time:
start on started system-services
With this formulation, the 'task' keyword is unnecessary, and
actually meaningless.
,
Aug 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/fdb2b5b64a9e91e4d403dca0feea70607e0dbae8 commit fdb2b5b64a9e91e4d403dca0feea70607e0dbae8 Author: Matthias Kaehlcke <mka@chromium.org> Date: Wed Aug 09 18:48:01 2017 power_manager: Install script to configure cpufreq BUG= chromium:750290 , chromium:214886 TEST=manual CQ-DEPEND=CL:596803 Change-Id: Iaf0d7f3b0e55acb12f6832af5b2c45639acf06dd Reviewed-on: https://chromium-review.googlesource.com/596521 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/fdb2b5b64a9e91e4d403dca0feea70607e0dbae8/chromeos-base/power_manager/power_manager-9999.ebuild
,
Aug 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/e06bb4f0e4a8afdedbf42ecb3868f214c76c9bb2 commit e06bb4f0e4a8afdedbf42ecb3868f214c76c9bb2 Author: Matthias Kaehlcke <mka@chromium.org> Date: Wed Aug 09 18:48:01 2017 power: Add script to configure cpufreq The script is called at boot and configures cpufreq according to the information in /etc/cpufreq.conf (if it exists). The current version only allows extended configuration for the interactive governor. Both single- and multi-policy configurations are supported. BUG= chromium:750290 , chromium:214886 TEST=manual CQ-DEPEND=CL:596521 Change-Id: I29a4e099cfd7e911add6e0a19a15a63e33df3bd4 Reviewed-on: https://chromium-review.googlesource.com/596803 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/e06bb4f0e4a8afdedbf42ecb3868f214c76c9bb2/power_manager/init/upstart/cpufreq.conf [add] https://crrev.com/e06bb4f0e4a8afdedbf42ecb3868f214c76c9bb2/power_manager/tools/cpufreq_config
,
Aug 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/d20a0f15dd37886ae39211510581483b2366060d commit d20a0f15dd37886ae39211510581483b2366060d Author: Matthias Kaehlcke <mka@chromium.org> Date: Fri Aug 11 00:12:39 2017 peach-pi: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools BUG= chromium:750290 , chromium:214886 TEST=build and boot peach-pi cd /sys/devices/system/cpu/cpufreq/interactive cat input_boost => 1 cat hispeed_freq => 650000:75 1800000:95 cat above_hispeed_delay => 20000 700000:0 1800000:20000 Change-Id: I73f94194f78379bf205e0e2a7fd93436d5103cdd Reviewed-on: https://chromium-review.googlesource.com/611010 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/d20a0f15dd37886ae39211510581483b2366060d/overlay-variant-peach-pi/chromeos-base/chromeos-bsp-pi/chromeos-bsp-pi-0.0.2.ebuild [modify] https://crrev.com/d20a0f15dd37886ae39211510581483b2366060d/overlay-variant-peach-pi/chromeos-base/chromeos-bsp-pi/files/cpufreq.conf [rename] https://crrev.com/d20a0f15dd37886ae39211510581483b2366060d/overlay-variant-peach-pi/chromeos-base/chromeos-bsp-pi/chromeos-bsp-pi-0.0.2-r9.ebuild
,
Aug 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/8e941b7c5e759f72eeba9b4c330cdb568c9c277d commit 8e941b7c5e759f72eeba9b4c330cdb568c9c277d Author: Matthias Kaehlcke <mka@chromium.org> Date: Fri Aug 11 03:24:09 2017 bsp-nyan: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools BUG= chromium:750290 , chromium:214886 TEST=build and boot nyan cd /sys/devices/system/cpu/cpufreq/interactive cat above_hispeed_delay => 19000 cat hispeed_freq => 564000:75 1938000:85 cat min_sample_time => 30000 Change-Id: If67b69a90e51f3c28fd66ea07dd0ebc4f74113cd Reviewed-on: https://chromium-review.googlesource.com/610503 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/8e941b7c5e759f72eeba9b4c330cdb568c9c277d/overlay-nyan/chromeos-base/chromeos-bsp-nyan/files/cpufreq.conf [rename] https://crrev.com/8e941b7c5e759f72eeba9b4c330cdb568c9c277d/overlay-nyan/chromeos-base/chromeos-bsp-nyan/chromeos-bsp-nyan-0.0.1-r17.ebuild [modify] https://crrev.com/8e941b7c5e759f72eeba9b4c330cdb568c9c277d/overlay-nyan/chromeos-base/chromeos-bsp-nyan/chromeos-bsp-nyan-0.0.1.ebuild
,
Aug 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/e2f8f9272ab5acc0b41a6625742314d178811ced commit e2f8f9272ab5acc0b41a6625742314d178811ced Author: Matthias Kaehlcke <mka@chromium.org> Date: Fri Aug 11 03:24:12 2017 baseboard-gru: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools (LMT). BUG= chromium:750290 , chromium:214886 TEST=build and boot kevin cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor sched sched ... Change-Id: I2c383a59e1971ee965851f13110fda553d03e082 Reviewed-on: https://chromium-review.googlesource.com/611201 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> [rename] https://crrev.com/e2f8f9272ab5acc0b41a6625742314d178811ced/baseboard-gru/chromeos-base/chromeos-bsp-baseboard-gru/chromeos-bsp-baseboard-gru-0.0.3-r9.ebuild [modify] https://crrev.com/e2f8f9272ab5acc0b41a6625742314d178811ced/baseboard-gru/chromeos-base/chromeos-bsp-baseboard-gru/chromeos-bsp-baseboard-gru-0.0.3.ebuild [modify] https://crrev.com/e2f8f9272ab5acc0b41a6625742314d178811ced/baseboard-gru/chromeos-base/chromeos-bsp-baseboard-gru/files/cpufreq.conf
,
Aug 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/3ca4a16b3b330ba47be4f6cf0fcd08d4ccd50f49 commit 3ca4a16b3b330ba47be4f6cf0fcd08d4ccd50f49 Author: Matthias Kaehlcke <mka@chromium.org> Date: Sat Aug 12 01:07:06 2017 bsp-baseboard-oak: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools (LMT). BUG= chromium:750290 , chromium:214886 TEST=build and boot oak cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor sched sched ... Change-Id: I12fbea9b231b1a3fd2967429936213a34df19d1a Reviewed-on: https://chromium-review.googlesource.com/611003 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> [rename] https://crrev.com/3ca4a16b3b330ba47be4f6cf0fcd08d4ccd50f49/baseboard-oak/chromeos-base/chromeos-bsp-baseboard-oak/chromeos-bsp-baseboard-oak-0.0.1-r6.ebuild [modify] https://crrev.com/3ca4a16b3b330ba47be4f6cf0fcd08d4ccd50f49/baseboard-oak/chromeos-base/chromeos-bsp-baseboard-oak/files/cpufreq.conf [modify] https://crrev.com/3ca4a16b3b330ba47be4f6cf0fcd08d4ccd50f49/baseboard-oak/chromeos-base/chromeos-bsp-baseboard-oak/chromeos-bsp-baseboard-oak-0.0.1.ebuild
,
Aug 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/8bd88d668ef1fc62ab71a7c6e24df8aad620440f commit 8bd88d668ef1fc62ab71a7c6e24df8aad620440f Author: Matthias Kaehlcke <mka@chromium.org> Date: Sat Aug 12 01:07:04 2017 peach-pit: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools BUG= chromium:750290 , chromium:214886 TEST=build and boot peach-pit cd /sys/devices/system/cpu/cpufreq/interactive cat input_boost => 1 cat hispeed_freq => 650000:75 1600000:95 cat above_hispeed_delay => 20000 700000:0 1600000:20000 Change-Id: Ice7b812f68f6e62cd260f92d95b817ff44d96286 Reviewed-on: https://chromium-review.googlesource.com/611133 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [rename] https://crrev.com/8bd88d668ef1fc62ab71a7c6e24df8aad620440f/overlay-variant-peach-pit/chromeos-base/chromeos-bsp-pit/chromeos-bsp-pit-0.0.2-r8.ebuild [modify] https://crrev.com/8bd88d668ef1fc62ab71a7c6e24df8aad620440f/overlay-variant-peach-pit/chromeos-base/chromeos-bsp-pit/files/cpufreq.conf [modify] https://crrev.com/8bd88d668ef1fc62ab71a7c6e24df8aad620440f/overlay-variant-peach-pit/chromeos-base/chromeos-bsp-pit/chromeos-bsp-pit-0.0.2.ebuild
,
Aug 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/b33fc77034b6b5edfa063170e142fcdbcc1644a7 commit b33fc77034b6b5edfa063170e142fcdbcc1644a7 Author: Matthias Kaehlcke <mka@chromium.org> Date: Sat Aug 12 01:07:04 2017 link: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools BUG= chromium:750290 , chromium:214886 TEST=build and boot link cd /sys/devices/system/cpu/cpufreq/interactive cat input_boost => 1 cat timer_rate => 10000 cat min_sample_time => 40000 cat hispeed_freq => 1800000:95 Change-Id: Ic71afa8fa06154669c7c5724d93e17afc0ae9ef2 Reviewed-on: https://chromium-review.googlesource.com/612447 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/b33fc77034b6b5edfa063170e142fcdbcc1644a7/overlay-link/chromeos-base/chromeos-bsp-link/files/cpufreq.conf [rename] https://crrev.com/b33fc77034b6b5edfa063170e142fcdbcc1644a7/overlay-link/chromeos-base/chromeos-bsp-link/chromeos-bsp-link-0.0.2-r31.ebuild [modify] https://crrev.com/b33fc77034b6b5edfa063170e142fcdbcc1644a7/overlay-link/chromeos-base/chromeos-bsp-link/chromeos-bsp-link-0.0.2.ebuild
,
Aug 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/f37f9b379e988968e9441f8b315100f4e6e63bca commit f37f9b379e988968e9441f8b315100f4e6e63bca Author: Matthias Kaehlcke <mka@chromium.org> Date: Fri Aug 18 01:42:28 2017 bsp-daisy: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools (LMT). The ignore_nice_load attribute set in the LMT configuration is not supported by the v3.8 kernel running on daisy. BUG= chromium:750290 , chromium:214886 TEST=build and boot skate cat /sys/devices/system/cpu/cpufreq/interactive/input_boost => 1 Change-Id: Ib835bcc219007c92a5237ed8031b12fdd0ff5708 Reviewed-on: https://chromium-review.googlesource.com/610470 Commit-Ready: Matthias Kaehlcke <mka@chromium.org> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [rename] https://crrev.com/f37f9b379e988968e9441f8b315100f4e6e63bca/overlay-daisy/chromeos-base/chromeos-bsp-daisy/chromeos-bsp-daisy-0.0.2-r9.ebuild [modify] https://crrev.com/f37f9b379e988968e9441f8b315100f4e6e63bca/overlay-daisy/chromeos-base/chromeos-bsp-daisy/files/cpufreq.conf [modify] https://crrev.com/f37f9b379e988968e9441f8b315100f4e6e63bca/overlay-daisy/chromeos-base/chromeos-bsp-daisy/chromeos-bsp-daisy-0.0.2.ebuild
,
Aug 18 2017
,
Jan 22 2018
,
Feb 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/b80a298677ffc7805c74c0d228d2c71827a51de1 commit b80a298677ffc7805c74c0d228d2c71827a51de1 Author: Matthias Kaehlcke <mka@chromium.org> Date: Fri Feb 02 11:40:36 2018 chromeos-bsp-veyron: Move cpufreq configuration to cpufreq task Configure cpufreq with the cpufreq task instead of laptop-mode-tools BUG= chromium:750290 , chromium:214886 TEST=build and boot veyron_mighty cd /sys/devices/system/cpu/cpufreq/interactive cat hispeed_freq => 1200000 cat go_hispeed_load => 95 Change-Id: I2714915338094f8b31c09aa2f326bea92fb43967 Reviewed-on: https://chromium-review.googlesource.com/898583 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [rename] https://crrev.com/b80a298677ffc7805c74c0d228d2c71827a51de1/overlay-veyron/chromeos-base/chromeos-bsp-veyron/chromeos-bsp-veyron-0.0.1-r28.ebuild [modify] https://crrev.com/b80a298677ffc7805c74c0d228d2c71827a51de1/overlay-veyron/chromeos-base/chromeos-bsp-veyron/files/cpufreq.conf [modify] https://crrev.com/b80a298677ffc7805c74c0d228d2c71827a51de1/overlay-veyron/chromeos-base/chromeos-bsp-veyron/chromeos-bsp-veyron-0.0.1.ebuild |
||||
►
Sign in to add a comment |
||||
Comment 1 by derat@chromium.org
, Jul 28 2017