Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:cpufreq:cpufreq [21 Jul 2020 09:05] – [Preferred Interface: sysfs] Sunny Fengresources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:cpufreq:cpufreq [21 Jul 2020 09:17] (current) – [Change Core Clock Frequency via cpufreq-utils] Sunny Feng
Line 3: Line 3:
  
 CPU frequency scaling enables the operating system to scale the CPU frequency up or down in order to save power. Clock scaling allows you to change the clock speed of the CPUs on the fly. CPU frequency scaling enables the operating system to scale the CPU frequency up or down in order to save power. Clock scaling allows you to change the clock speed of the CPUs on the fly.
- 
-More details about ethernet for SC589, please refer to this section Enable Ethernet for ADSP-SC589 EZ-kit board version 2.0 in SC5xx EZ-Kit Linux Quick Start Guide . 
- 
 ===== Hardware Setup ===== ===== Hardware Setup =====
   * ADSP-SC589 Ezkit v1.1 and above, or,   * ADSP-SC589 Ezkit v1.1 and above, or,
Line 14: Line 11:
 The ADSP-SC5xx processors have Clock Generation Unit (CGU) support. The CGU allows program to change the PLL clock frequency and the CCLKn, SYSCLK, SCLKn, and OUTCLK clock scaling. The ADSP-SC5xx processors have Clock Generation Unit (CGU) support. The CGU allows program to change the PLL clock frequency and the CCLKn, SYSCLK, SCLKn, and OUTCLK clock scaling.
  
 +\\
 ===== Software Configuration ===== ===== Software Configuration =====
 ==== Enabling CPU Frequency Driver in Linux Kernel ==== ==== Enabling CPU Frequency Driver in Linux Kernel ====
Line 35: Line 33:
  
 \\ \\
-===== How to Change the CPU cpufreq =====+===== How to Change the CPU Frequency =====
 ==== Preferred Interface: sysfs ==== ==== Preferred Interface: sysfs ====
 The preferred interface is located in the sysfs filesystem. If you mounted it at /sys, the cpufreq interface is located in a subdirectory “cpufreq” within the cpu-device directory (e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU). The preferred interface is located in the sysfs filesystem. If you mounted it at /sys, the cpufreq interface is located in a subdirectory “cpufreq” within the cpu-device directory (e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).
Line 62: Line 60:
 </code> </code>
  
 +\\
 ===== What Is A CPUFreq Governor? ===== ===== What Is A CPUFreq Governor? =====
 ==== Governors In the Linux Kernel ==== ==== Governors In the Linux Kernel ====
  
-**Performance**+=== Performance === 
 The CPUfreq governor “performance” sets the CPU statically to the highest frequency within the borders of scaling_min_freq and scaling_max_freq. The CPUfreq governor “performance” sets the CPU statically to the highest frequency within the borders of scaling_min_freq and scaling_max_freq.
  
-**Powersave**+=== Powersave ===
 The CPUfreq governor “powersave” sets the CPU statically to the lowest frequency within the borders of scaling_min_freq and scaling_max_freq. The CPUfreq governor “powersave” sets the CPU statically to the lowest frequency within the borders of scaling_min_freq and scaling_max_freq.
  
-**Userspace**+=== Userspace ===
 The CPUfreq governor “userspace” allows the user, or any userspace program running with UID “root”, to set the CPU to a specific frequency by making a sysfs file “scaling_setspeed” available in the CPU-device directory. The CPUfreq governor “userspace” allows the user, or any userspace program running with UID “root”, to set the CPU to a specific frequency by making a sysfs file “scaling_setspeed” available in the CPU-device directory.
  
-**Ondemand**+=== Ondemand ===
 The CPUfreq governor “ondemand” sets the CPU depending on the current usage. To do this the CPU must have the capability to switch the frequency very quickly. There are a number of sysfs file accessible parameters: The CPUfreq governor “ondemand” sets the CPU depending on the current usage. To do this the CPU must have the capability to switch the frequency very quickly. There are a number of sysfs file accessible parameters:
  
Line 87: Line 87:
 ignore_nice_load: This parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilisation' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus are ignored) in the overall usage calculation. This is useful if you are running a CPU intensive calculation on your laptop that you do not care how long it takes to complete, as you can 'nice' it and prevent it from taking part in the deciding process of whether to increase your CPU frequency. ignore_nice_load: This parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilisation' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus are ignored) in the overall usage calculation. This is useful if you are running a CPU intensive calculation on your laptop that you do not care how long it takes to complete, as you can 'nice' it and prevent it from taking part in the deciding process of whether to increase your CPU frequency.
  
-**Conservative**+=== Conservative ===
 The CPUfreq governor “conservative”, much like the “ondemand” governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour is more suitable in a battery powered environment. The governor is tweaked in the same manner as the “ondemand” governor through sysfs with the addition of: The CPUfreq governor “conservative”, much like the “ondemand” governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour is more suitable in a battery powered environment. The governor is tweaked in the same manner as the “ondemand” governor through sysfs with the addition of:
  
Line 134: Line 134:
  
 </code> </code>
 +
 +
 +\\
 +----
 +**Back to** [[resources:tools-software/linuxdsp/docs/linux-kernel-and-drivers/start|Kernel Features and Device Drivers for ADSP-SC5xx Yocto Linux]]
resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/cpufreq/cpufreq.1595315152.txt.gz · Last modified: 21 Jul 2020 09:05 by Sunny Feng