CPU frequency and voltage adjustment in Linux kernel--(1) __linux

Source: Internet
Author: User
Tags echo command

By dynamically changing the CPU voltage, you can adjust the CPU frequency.

The CPU clock frequency can be changed dynamically by changing the clock multiple.

Some processors with adjustable CPU main frequency clock multiples can switch dynamically between different main frequencies and operating voltages without the need for kernel or user intervention.


Terminology Definition

Policy (Policy): In the system, users can only choose the maximum frequency and lower limit, and whether the desire for aggressive power consumption mode or better processor performance mode.

Manager (Governor): In all other CPUFREQ implementations, you still need to set the main frequency boundary. Governor determines the speed at which the processor runs within the frequency limit.


How to adjust CPU frequency policy or speed


The Sysfs file system is the default control interface.

Generally, the Cpufreq control node of the first processor core is located in/sys/devices/system/cpu/cpu0/cpufreq/.

Cpuinfo_min_freq: This file specifies the minimum operating frequency (in thousands of Hertz) that the processor can run

Cpuinfo_max_freq: This file specifies the maximum operating frequency (in hertz) that the processor can run

Cpuinfo_transition_latency: This file defines the time required for the processor to switch between two different frequencies (in nanoseconds)

Scaling_driver: This file shows what cpufreq the CPU is using driver

Scaling_available_governors: This file displays all Cpufreq governor types supported in the current kernel

Scaling_governor: Can change the governor type of the current processor through the echo command

Cpuinfo_cur_freq: Current CPU Operating frequency

Scaling_available_frequencies: List of all supported main frequencies (in hertz)

Scaling_min_freq/scaling_max_freq: Displays the upper and lower limits of the current policy in kilobytes (Hertz)

Note that when you change the CPU policy, you need to set the Scaling_max_freq first and then the Scaling_min_freq

Affected_cpus: CPU list that requires the frequency of software coordination

Related_cpus: CPU list requiring software or hardware to coordinate frequencies

Hardware driver for Scaling_driver:cpufreq control

Scaling_cur_freq: The current CPU operating frequency determined by the governor and Cpufreq cores. This frequency is the main frequency that the kernel considers the CPU is currently running

Bios_limit: If the BIOS tells the operating system to limit a CPU to a low frequency, the user can read the maximum frequency it supports from this file.

Scaling_setspeed: If the user chooses the "userspace" governor, you can set the CPU working frequency to a specified value. This value is only required between Scaling_min_freq and Scaling_max_freq.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.