Skip to content

Commit

Permalink
interfaces/cpu-control: allow to control cpufreq tunables
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Murray <alex.murray@canonical.com>
  • Loading branch information
alexmurray committed Feb 13, 2020
1 parent 05bb62d commit fa29f23
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions interfaces/builtin/cpu_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ const cpuControlConnectedPlugAppArmor = `
/sys/devices/system/cpu/cpu*/online rw,
/sys/devices/system/cpu/smt/* r,
/sys/devices/system/cpu/smt/control w,
# https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html#policy-interface-in-sysfs
/sys/devices/system/cpu/cpufreq/* r,
/sys/devices/system/cpu/cpufreq/policy*/* r,
/sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference w,
/sys/devices/system/cpu/cpufreq/policy*/scaling_governor w,
/sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq w,
/sys/devices/system/cpu/cpufreq/policy*/scaling_min_freq w,
/sys/devices/system/cpu/cpufreq/policy*/scaling_setspeed w,
/sys/devices/system/cpu/cpufreq/boost w,
# https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_pstate.html#user-space-interface-in-sysfs
/sys/devices/system/cpu/cpufreq/intel_pstate/* r,
/sys/devices/system/cpu/cpufreq/intel_pstate/hwp_dynamic_boost w,
/sys/devices/system/cpu/cpufreq/intel_pstate/max_perf_pct w,
/sys/devices/system/cpu/cpufreq/intel_pstate/min_perf_pct w,
/sys/devices/system/cpu/cpufreq/intel_pstate/no_turbo w,
/sys/devices/system/cpu/cpufreq/intel_pstate/status w,
`

func init() {
Expand Down

0 comments on commit fa29f23

Please sign in to comment.