]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/attributes/default.rb
hardware: set CPU Energy-Performance Bias to performance
[chef.git] / 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