]> git.openstreetmap.org Git - chef.git/commitdiff
hardware: set CPU Energy-Performance Bias to performance
authorGrant Slater <git@firefishy.com>
Wed, 6 Jul 2022 13:45:55 +0000 (16:45 +0300)
committerGrant Slater <git@firefishy.com>
Wed, 6 Jul 2022 13:46:23 +0000 (16:46 +0300)
cookbooks/hardware/attributes/default.rb

index d86e0347e999a4ff2a2cbd6b996c27d545d1ff90..484c3987fa5111d9742a5acabcab9b27dc9cd79e 100644 (file)
@@ -57,3 +57,8 @@ if File.exist?("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor") &&
   default[:sysfs][:cpufreq_ondemand][:parameters][:"devices/system/cpu/cpufreq/ondemand/up_threshold"] = "25"
   default[:sysfs][:cpufreq_ondemand][:parameters][:"devices/system/cpu/cpufreq/ondemand/sampling_down_factor"] = "100"
 end
+
+if File.exist?("/sys/devices/system/cpu/cpu0/power/energy_perf_bias")
+  default[:sysfs][:cpu_power_energy_perf_bias][:comment] = "Set CPU Energy-Performance Bias Preference to performance"
+  default[:sysfs][:cpu_power_energy_perf_bias][:parameters][:"devices/system/cpu/cpu*/power/energy_perf_bias"] = "0"
+end
\ No newline at end of file