Documentation/translations/zh_TW/cpu-freq/cpufreq-stats.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_TW/cpu-freq/cpufreq-stats.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_TW/cpu-freq/cpufreq-stats.rst- Extension
.rst- Size
- 4502 bytes
- Lines
- 135
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_TW.rst
:Original: Documentation/cpu-freq/cpufreq-stats.rst
:翻譯:
司延騰 Yanteng Si <siyanteng@loongson.cn>
:校譯:
唐藝舟 Tang Yizhou <tangyeechou@gmail.com>
==========================================
sysfs CPUFreq Stats的一般說明
==========================================
爲使用者準備的信息
作者: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
.. Contents
1. 簡介
2. 提供的統計數據(舉例說明)
3. 配置cpufreq-stats
1. 簡介
===============
cpufreq-stats是一種爲每個CPU提供CPU頻率統計的驅動。
這些統計數據以/sysfs中一系列只讀接口的形式呈現。cpufreq-stats接口(若已配置)將爲每個CPU生成
/sysfs(<sysfs root>/devices/system/cpu/cpuX/cpufreq/stats/)中cpufreq目錄下的stats目錄。
各項統計數據將在stats目錄下形成對應的只讀文件。
此驅動是以獨立於任何可能運行在你所用CPU上的特定cpufreq_driver的方式設計的。因此,它將能和任何
cpufreq_driver協同工作。
2. 已提供的統計數據(有例子)
=====================================
cpufreq stats提供了以下統計數據(在下面詳細解釋)。
- time_in_state
- total_trans
- trans_table
所有統計數據來自以下時間範圍:從統計驅動被加載的時間(或統計數據被重置的時間)開始,到某一統計數據被讀取的時間爲止。
顯然,統計驅動不會保存它被加載之前的任何頻率轉換信息。
::
<mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # ls -l
total 0
drwxr-xr-x 2 root root 0 May 14 16:06 .
drwxr-xr-x 3 root root 0 May 14 15:58 ..
--w------- 1 root root 4096 May 14 16:06 reset
-r--r--r-- 1 root root 4096 May 14 16:06 time_in_state
-r--r--r-- 1 root root 4096 May 14 16:06 total_trans
-r--r--r-- 1 root root 4096 May 14 16:06 trans_table
- **reset**
只寫屬性,可用於重置統計計數器。這對於評估不同調節器的系統行爲非常有用,且無需重啓。
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.