Linux Dynamic Frequency Scaling

From ArmadeusWiki
Revision as of 17:06, 30 June 2011 by JulienB (Talk | contribs)

Jump to: navigation, search

Page under construction... Construction.png Informations on this page are not guaranteed !!

Introduction

Dynamic Frequency Scaling aka DFS is only available on APF27 and APF51 based systems.

Linux configuration

CPU Power Management  --->
    [*] CPU Frequency scaling
    [*]   Enable CPUfreq debugging
    <*>   CPU frequency translation statistics
    [ ]     CPU frequency translation statistics details
          Default CPUFreq governor (performance)  --->
    -*-   'performance' governor
    <M>   'powersave' governor
    <M>   'userspace' governor for userspace frequency scaling
    <M>   'ondemand' cpufreq policy governor
    <M>   'conservative' cpufreq governor
    <M>   CPUfreq driver for i.MX CPUs

frequency scaling handling is done in arch/arm/plat-mxc/cpufreq.c or arch/arm/mach-mx2/cpufreq_imx27.c

To know if driver is launched

# dmesg | grep freq
i.MXC CPU frequency driver

Usage (sysfs)

  • all is here:
# cd /sys/devices/system/cpu/cpu0/cpufreq/
# ls
  • get current governor:
# cat scaling_governor
performance
  • list available governors:
# cat scaling_available_governors
performance
  • eventually load some more:
# modprobe cpufreq_powersave
# modprobe cpufreq_conservative
# cat scaling_available_governors
conservative powersave performance
  • change governor:
# echo powersave > scaling_governor
  • change frequency manually (here 133MHz). Requires userspace governor ! :
# echo 133000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
  • To know current CPU frequency (here 160MHz):
# cat cpuinfo_cur_freq 
160000
  • To know how much time CPU has spent in its different state (here 160MHz and 800MHz):
# cat stats/time_in_state 
160000 243595
800000 585
  • To Be Continued...

Links