All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation
@ 2021-03-29  2:51 Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 1/8] docs/zh_CN: add cpu-freq core.rst translation Yanteng Si
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

This series of patches:
 translates Documention/cpu-freq/* into Chinese.
 add .../zh_CN/mips to zh_CN index
 add .../zh_CN/iio to zh_CN index
 add .../zh_CN/riscv to zh_CN index

v1 -> v2:

Correction of some errata;
Thanks to Jiaxun and Xiangcheng for their
help,:)

Yabteng Si(8):
docs/zh_CN: add cpu-freq core.rst translation
docs/zh_CN: add cpu-freq cpu-drivers.rst translation
docs/zh_CN: add cpu-freq cpufreq-stats.rst translation
docs/zh_CN: add cpu-freq index.rst translation
docs/zh_CN: add cpu-freq to zh_CN index
docs/zh_CN: add mips to zh_CN index
docs/zh_CN: add iio to zh_CN index
docs/zh_CN: add riscv to zh_CN index

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 Documentation/translations/zh_CN/cpu-freq/core.rst          | 105
+++++++++++++++++++++++++++++++++++++++++++++
 Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst   | 259
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst | 130
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Documentation/translations/zh_CN/cpu-freq/index.rst         |  45
++++++++++++++++++++
 Documentation/translations/zh_CN/index.rst                  |   4 ++
 5 files changed, 543 insertions(+)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2 1/8] docs/zh_CN: add cpu-freq core.rst translation
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation Yanteng Si
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

This patch translates Documention/cpu-freq/core.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../translations/zh_CN/cpu-freq/core.rst      | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/translations/zh_CN/cpu-freq/core.rst

diff --git a/Documentation/translations/zh_CN/cpu-freq/core.rst b/Documentation/translations/zh_CN/cpu-freq/core.rst
new file mode 100644
index 000000000000..1571087c2581
--- /dev/null
+++ b/Documentation/translations/zh_CN/cpu-freq/core.rst
@@ -0,0 +1,105 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: :doc:`../../../cpu-freq/core`
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_core.rst:
+
+
+====================================
+CPUFreq核心和CPUFreq通知器的通用说明
+====================================
+
+作者:
+	- Dominik Brodowski  <linux@brodo.de>
+	- David Kimdon <dwhedon@debian.org>
+	- Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+	- Viresh Kumar <viresh.kumar@linaro.org>
+
+.. 目录:
+
+   1.  CPUFreq核心和接口
+   2.  CPUFreq通知器
+   3.  含有Operating Performance Point (OPP)的CPUFreq表的生成
+
+1. CPUFreq核心和接口
+======================
+
+cpufreq核心代码位于drivers/cpufreq/cpufreq.c中。这些cpufreq代码为CPUFreq架构的驱
+动程序(那些操作硬件切换频率的代码)以及 "通知器 "提供了一个标准化的接口。
+这些是设备驱动程序或需要了解策略变化的其它内核部分(如 ACPI 热量管理)或所有频率更改(除
+计时代码外),甚至需要强制确定速度限制的通知器(如 ARM 架构上的 LCD 驱动程序)。
+此外, 内核 "常数" loops_per_jiffy会根据频率变化而更新。
+
+cpufreq策略的引用计数由 cpufreq_cpu_get 和 cpufreq_cpu_put 来完成,以确保 cpufreq 驱
+动程序被正确地注册到核心中,并且驱动程序在 cpufreq_put_cpu 被调用之前不会被卸载。这也保证
+了每个CPU核的cpufreq 策略在使用期间不会被释放。
+
+2. CPUFreq 通知器
+====================
+
+CPUFreq通知器符合标准的内核通知器接口。
+关于通知器的细节请参阅 linux/include/linux/notifier.h。
+
+这里有两个不同的CPUfreq通知器 - 策略通知器和转换通知器。
+
+
+2.1 CPUFreq策略通知器
+----------------------------
+
+当创建或移除策略时,这些都会被通知。
+
+阶段是在通知器的第二个参数中指定的。当第一次创建策略时,阶段是CPUFREQ_CREATE_POLICY,当
+策略被移除时,阶段是CPUFREQ_REMOVE_POLICY。
+
+第三个参数 ``void *pointer`` 指向一个结构体cpufreq_policy,其包括min,max(新策略的下限和
+上限(单位为kHz))这几个值。
+
+
+2.2 CPUFreq转换通知器
+--------------------------------
+
+当CPUfreq驱动切换CPU核心频率时,策略中的每个在线CPU都会收到两次通知,这些变化没有任何外部干
+预。
+
+第二个参数指定阶段 - CPUFREQ_PRECHANGE or CPUFREQ_POSTCHANGE.
+
+第三个参数是一个包含如下值的结构体cpufreq_freqs:
+
+=====	====================
+cpu	受影响cpu的编号
+old	旧频率
+new	新频率
+flags	cpufreq驱动的标志
+=====	====================
+
+3. 含有Operating Performance Point (OPP)的CPUFreq表的生成
+==================================================================
+关于OPP的细节请参阅 Documentation/power/opp.rst
+
+dev_pm_opp_init_cpufreq_table -
+	这个功能提供了一个随时可用的转换程序,用来将OPP层关于可用频率的内部信息翻译成一种容易提供给
+	cpufreq的格式。
+
+	.. Warning::
+
+		不要在中断上下文中使用此函数。
+
+	例如::
+
+	 soc_pm_init()
+	 {
+		/* Do things */
+		r = dev_pm_opp_init_cpufreq_table(dev, &freq_table);
+		if (!r)
+			policy->freq_table = freq_table;
+		/* Do other things */
+	 }
+
+	.. note::
+
+		该函数只有在CONFIG_PM_OPP之外还启用了CONFIG_CPU_FREQ时才可用。
+
+dev_pm_opp_free_cpufreq_table
+	释放dev_pm_opp_init_cpufreq_table分配的表。
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 1/8] docs/zh_CN: add cpu-freq core.rst translation Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  6:21   ` Wu X.C.
  2021-03-29  2:51 ` [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation Yanteng Si
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

This patch translates Documention/cpu-freq/cpu-drivers.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../zh_CN/cpu-freq/cpu-drivers.rst            | 259 ++++++++++++++++++
 1 file changed, 259 insertions(+)
 create mode 100644 Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst

diff --git a/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst b/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
new file mode 100644
index 000000000000..27a70f3a9938
--- /dev/null
+++ b/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
@@ -0,0 +1,259 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: :doc:`../../../cpu-freq/cpu-drivers`
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_cpu-drivers.rst:
+
+
+=======================================
+如何实现一个新的CPUFreq处理器驱动程序?
+=======================================
+
+作者:
+
+
+	- Dominik Brodowski  <linux@brodo.de>
+	- Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+	- Viresh Kumar <viresh.kumar@linaro.org>
+
+.. Contents
+
+   1.   怎么做?
+   1.1  初始化
+   1.2  Per-CPU 初始化
+   1.3  验证
+   1.4  target/target_index 或 setpolicy?
+   1.5  target/target_index
+   1.6  setpolicy
+   1.7  get_intermediate 与 target_intermediate
+   2.   频率表助手
+
+
+
+1. 怎么做?
+===========
+
+如此,你刚刚得到了一个全新的CPU/芯片组及其数据手册,并希望为这个CPU/芯片组添加cpufreq
+支持?很好,这里有一些至关重要的提示:
+
+
+1.1 初始化
+----------
+
+首先,在__initcall_level_7 (module_init())或更靠后的函数中检查这个内核是否
+运行在正确的CPU和正确的芯片组上。如果是,则使用cpufreq_register_driver()向
+CPUfreq核心层注册一个cpufreq_driver结构体。
+
+结构体cpufreq_driver应该包含什么成员?
+
+ .name - 驱动的名字。
+
+ .init - 一个指向per-policy初始化函数的指针。
+
+ .verify - 一个指向"verification"函数的指针。
+
+ .setpolicy 或 .fast_switch 或 .target 或 .target_index - 差异见
+ 下文。
+
+并且可选择
+
+ .flags - cpufreq核的提示。
+
+ .driver_data - cpufreq驱动程序的特定数据。
+
+ .resolve_freq - 返回最适合目标频率的频率。不过并不能改变频率。
+
+ .get_intermediate 和 target_intermediate - 用于在改变CPU频率时切换到稳定
+ 的频率。
+
+ .get - 返回CPU的当前频率。
+
+ .bios_limit - 返回HW/BIOS对CPU的最大频率限制值。
+
+ .exit - 一个指向per-policy清理函数的指针,该函数在cpu热插拔过程的CPU_POST_DEAD
+ 阶段被调用。
+
+ .stop_cpu - 一个指向per-policy停止函数的指针,该函数在cpu热插拔过程的CPU_DOWN_PREPARE
+ 阶段被调用。
+
+ .suspend - 一个指向per-policy暂停函数的指针,该函数在关中断且在该策略的调节器停止
+ 后被调用。
+
+ .resume - 一个指向per-policy恢复函数的指针,该函数在关中断且在调节器再一次开始前被
+ 调用。
+
+ .ready - 一个指向per-policy准备函数的指针,该函数在策略完全初始化之后被调用。
+
+ .attr - 一个指向NULL结尾的"struct freq_attr"列表的指针,该函数允许导出值到
+ sysfs。
+
+ .boost_enabled - 如果设置,则启用提升(boost)频率。
+
+ .set_boost - 一个指向per-policy函数的指针,该函数用来开启/关闭提升(boost)频率功能。
+
+
+1.2 Per-CPU 初始化
+------------------
+
+每当一个新的CPU被注册到设备模型中,或者在cpufreq驱动注册自己之后,如果此CPU的cpufreq策
+略不存在,则会调用per-policy的初始化函数cpufreq_driver.init。请注意,.init()和.exit()程序
+只对策略调用一次,而不是对策略管理的每个CPU调用一次。它需要一个 ``struct cpufreq_policy
+*policy`` 作为参数。现在该怎么做呢?
+
+如果有必要,请在你的CPU上激活CPUfreq功能支持。
+
+然后,驱动程序必须填写以下数值:
+
++-----------------------------------+--------------------------------------+
+|policy->cpuinfo.min_freq 和	   |					  |
+|policy->cpuinfo.max_freq	    | 该CPU支持的最低和最高频率(kHz)     |
+|				    |                                      |
+|				    | 				           |
++-----------------------------------+--------------------------------------+
+|policy->cpuinfo.transition_latency |                                      |
+|				    | CPU在两个频率之间切换所需的时间,以  |
+|				    | 纳秒为单位(如适用,否则指定         |
+|				    | CPUFREQ_ETERNAL)                    |
++-----------------------------------+--------------------------------------+
+|policy->cur			    | 该CPU当前的工作频率(如适用)          |
+|				    |                                      |
++-----------------------------------+--------------------------------------+
+|policy->min,			    |					   |
+|policy->max,			    |					   |
+|policy->policy and, if necessary,  |					   |
+|policy->governor		    | 必须包含该cpu的 “默认策略”。稍后     |
+|				    | 会用这些值调用                       |
+|				    | cpufreq_driver.verify and either     |
+|				    | cpufreq_driver.setpolicy or          |
+|				    | cpufreq_driver.target/target_index   |
+|				    | 		                           |
++-----------------------------------+--------------------------------------+
+|policy->cpus			    | 用与这个CPU一起做DVFS的(在线+离线)   |
+|				    | CPU(即与它共享时钟/电压轨)的掩码更新 |
+|				    | 这个                                 |
+|				    |                                      |
++-----------------------------------+--------------------------------------+
+
+对于设置其中的一些值(cpuinfo.min[max]_freq, policy->min[max]),频率表助手可能会有帮
+助。关于它们的更多信息,请参见第2节。
+
+
+1.3 验证
+--------
+
+当用户决定设置一个新的策略(由 “policy,governor,min,max组成”)时,必须对这个策略进行验证,
+以便纠正不兼容的值。为了验证这些值,cpufreq_verify_within_limits(``struct cpufreq_policy
+*policy``, ``unsigned int min_freq``, ``unsigned int max_freq``)函数可能会有帮助。
+关于频率表助手的详细内容请参见第2节。
+
+您需要确保至少有一个有效频率(或工作范围)在 policy->min 和 policy->max 范围内。如果有必
+要,先增加policy->max,只有在没有办法的情况下,才减少policy->min。
+
+
+1.4 target 或 target_index 或 setpolicy 或 fast_switch?
+-------------------------------------------------------
+
+大多数cpufreq驱动甚至大多数cpu频率升降算法只允许将CPU频率设置为预定义的固定值。对于这些,你
+可以使用->target(),->target_index()或->fast_switch()回调。
+
+有些cpufreq功能的处理器可以自己在某些限制之间切换频率。这些应使用->setpolicy()回调。
+
+
+1.5. target/target_index
+------------------------
+
+target_index调用有两个参数/:``struct cpufreq_policy * policy``和``unsigned int``
+索引(于列出的频率表)。
+
+当调用这里时,CPUfreq驱动必须设置新的频率。实际频率必须由freq_table[index].frequency决定。
+
+它应该总是在错误的情况下恢复到之前的频率(即policy->restore_freq),即使我们之前切换到中间频率。
+
+已弃用
+----------
+目标调用有三个参数。``struct cpufreq_policy * policy``, unsigned int target_frequency,
+unsigned int relation.
+
+CPUfreq驱动在调用这里时必须设置新的频率。实际的频率必须使用以下规则来确定。
+
+- 紧跟 "目标频率"。
+- policy->min <= new_freq <= policy->max (这必须是有效的!!!)
+- 如果 relation==CPUFREQ_REL_L,尝试选择一个高于或等于 target_freq 的 new_freq。("L代表
+  最低,但不能低于")
+- 如果 relation==CPUFREQ_REL_H,尝试选择一个低于或等于 target_freq 的 new_freq。("H代表
+  最高,但不能高于")
+
+这里,频率表助手可能会帮助你--详见第2节。
+
+1.6. fast_switch
+----------------
+
+这个函数用于从调度器的上下文进行频率切换。并非所有的驱动都要实现它,因为不允许在这个回调中睡眠。这
+个回调必须经过高度优化,以尽可能快地进行切换。
+
+这个函数有两个参数: ``struct cpufreq_policy *policy`` 和 ``unsigned int target_frequency``。
+
+
+1.7 setpolicy
+-------------
+
+setpolicy调用只需要一个``struct cpufreq_policy * policy``作为参数。需要将处理器内或芯片组内动态频
+率切换的下限设置为policy->min,上限设置为policy->max,如果支持的话,当policy->policy为
+CPUFREQ_POLICY_PERFORMANCE时选择面向性能的设置,当CPUFREQ_POLICY_POWERSAVE时选择面向省电的设置。
+也可以查看drivers/cpufreq/longrun.c中的参考实现。
+
+1.8 get_intermediate 和 target_intermediate
+--------------------------------------------
+
+仅适用于 target_index() 和 CPUFREQ_ASYNC_NOTIFICATION 未设置的驱动。
+
+get_intermediate应该返回一个平台想要切换到的稳定的中间频率,target_intermediate()应该将CPU设置为
+该频率,然后再跳转到'index'对应的频率。核心会负责发送通知,驱动不必在target_intermediate()或
+target_index()中处理。
+
+在驱动程序不想因为某个目标频率切换到中间频率的情况下,它们可以从get_intermediate()中返回'0'。在这种情况
+下,核心将直接调用->target_index()。
+
+注意:->target_index()应该在失败的情况下恢复到policy->restore_freq,因为core会为此发送通知。
+
+
+2. 频率表助手
+=============
+
+由于大多数cpufreq处理器只允许被设置为几个特定的频率,因此,一个带有一些函数的 “频率表”可能会辅助处理器驱动
+程序的一些工作。这样的 "频率表" 由一个cpufreq_frequency_table条目构成的数组组成,"driver_data" 中包
+含了驱动程序的具体数值,"frequency" 中包含了相应的频率,并设置了标志。在表的最后,需要添加一个
+cpufreq_frequency_table条目,频率设置为CPUFREQ_TABLE_END。而如果想跳过表中的一个条目,则将频率设置为
+CPUFREQ_ENTRY_INVALID。这些条目不需要按照任何特定的顺序排序,但如果它们是cpufreq 核心会对它们进行快速的DVFS,
+因为搜索最佳匹配会更快。
+
+如果策略在其policy->freq_table字段中包含一个有效的指针,cpufreq表就会被核心自动验证。
+
+cpufreq_frequency_table_verify()保证至少有一个有效的频率在policy->min和policy->max范围内,并且所有其他
+标准都被满足。这对->verify调用很有帮助。
+
+cpufreq_frequency_table_target()是对应于->target阶段的频率表助手。只要把数值传递给这个函数,这个函数就会返
+回包含CPU要设置的频率的频率表条目。
+
+以下宏可以作为cpufreq_frequency_table的迭代器。
+
+cpufreq_for_each_entry(pos, table) - 遍历频率表的所有条目。
+
+cpufreq_for_each_valid_entry(pos, table) - 该函数遍历所有条目,不包括CPUFREQ_ENTRY_INVALID频率。
+使用参数 "pos"-一个``cpufreq_frequency_table * `` 作为循环变量,使用参数 "table"-作为你想迭代
+的``cpufreq_frequency_table * `` 。
+
+例如::
+
+	struct cpufreq_frequency_table *pos, *driver_freq_table;
+
+	cpufreq_for_each_entry(pos, driver_freq_table) {
+		/* Do something with pos */
+		pos->frequency = ...
+	}
+
+如果你需要在driver_freq_table中处理pos的位置,不要减去指针,因为它的代价相当高。相反,使用宏
+  cpufreq_for_each_entry_idx() 和 cpufreq_for_each_valid_entry_idx() 。
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 1/8] docs/zh_CN: add cpu-freq core.rst translation Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  6:23   ` Wu X.C.
  2021-03-29  2:51 ` [PATCH v2 4/8] docs/zh_CN: add cpu-freq index.rst translation Yanteng Si
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

This patch translates Documention/cpu-freq/cpufreq-stats.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../zh_CN/cpu-freq/cpufreq-stats.rst          | 130 ++++++++++++++++++
 1 file changed, 130 insertions(+)
 create mode 100644 Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst

diff --git a/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst b/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
new file mode 100644
index 000000000000..d21a317d9659
--- /dev/null
+++ b/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
@@ -0,0 +1,130 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: :doc:`../../../cpu-freq/cpufreq-stats`
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_cpufreq-stats.rst:
+
+
+==========================================
+sysfs CPUFreq Stats的一般说明
+==========================================
+
+用户信息
+
+
+作者: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+
+.. Contents
+
+   1. 简介
+   2. 提供的统计数据(举例说明)
+   3. 配置cpufreq-stats
+
+
+1. 简介
+===============
+
+cpufreq-stats是一个为每个CPU提供CPU频率统计的驱动。
+这些统计数据在/sysfs中以一堆只读接口的形式提供。这个接口(在配置好后)将出现在
+/sysfs(<sysfs root>/devices/system/cpu/cpuX/cpufreq/stats/)中cpufreq下的一个单
+独的目录中,提供给每个CPU。
+各种统计数据将在此目录下形成只读文件。
+
+此驱动是独立于任何可能运行在你所用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**
+
+只写属性,可用于重置统计计数器。这对于评估不同调节器下的系统行为非常有用,且无需重启。
+
+
+- **time_in_state**
+
+此项给出了这个CPU所支持的每个频率所花费的时间。cat输出的每一行都会有"<frequency>
+<time>"对,表示这个CPU在<frequency>上花费了<time>个usertime单位的时间。这里的
+usertime单位是10mS(类似于/proc中输出的其他时间)。
+
+::
+
+    <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat time_in_state
+    3600000 2089
+    3400000 136
+    3200000 34
+    3000000 67
+    2800000 172488
+
+
+- **total_trans**
+
+给出了这个CPU上频率转换的总次数。cat的输出将有一个单一的计数,这就是频率转换的总数。
+
+::
+
+    <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat total_trans
+    20
+
+- **trans_table**
+
+这将提供所有CPU频率转换的细粒度信息。这里的cat输出是一个二维矩阵,其中一个条目<i, j>(第
+i行,第j列)代表从Freq_i到Freq_j的转换次数。Freq_i行和Freq_j列遵循驱动最初提供给cpufreq
+核的频率表的排序顺序,因此可以排序(升序或降序)或不排序。 这里的输出也包含了每行每列的实际
+频率值,以便更好地阅读。
+
+如果转换表大于PAGE_SIZE,读取时将返回一个-EFBIG错误。
+
+::
+
+    <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat trans_table
+    From  :    To
+	    :   3600000   3400000   3200000   3000000   2800000
+    3600000:         0         5         0         0         0
+    3400000:         4         0         2         0         0
+    3200000:         0         1         0         2         0
+    3000000:         0         0         1         0         3
+    2800000:         0         0         0         2         0
+
+3. 配置cpufreq-stats
+============================
+
+要在你的内核中配置cpufreq-stats::
+
+	Config Main Menu
+		Power management options (ACPI, APM)  --->
+			CPU Frequency scaling  --->
+				[*] CPU Frequency scaling
+				[*]   CPU frequency translation statistics
+
+
+"CPU Frequency scaling" (CONFIG_CPU_FREQ) 应该被启用以配置cpufreq-stats。
+
+"CPU frequency translation statistics" (CONFIG_CPU_FREQ_STAT)提供了包括
+time_in_state、total_trans和trans_table的统计数据。
+
+一旦启用了这个选项,并且你的CPU支持cpufrequency,你就可以在/sysfs中看到CPU频率统计。
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 4/8] docs/zh_CN: add cpu-freq index.rst translation
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
                   ` (2 preceding siblings ...)
  2021-03-29  2:51 ` [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 5/8] docs/zh_CN: add cpu-freq to zh_CN index Yanteng Si
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

This patch translates Documention/cpu-freq/index.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../translations/zh_CN/cpu-freq/index.rst     | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/translations/zh_CN/cpu-freq/index.rst

diff --git a/Documentation/translations/zh_CN/cpu-freq/index.rst b/Documentation/translations/zh_CN/cpu-freq/index.rst
new file mode 100644
index 000000000000..39d4b058fd7f
--- /dev/null
+++ b/Documentation/translations/zh_CN/cpu-freq/index.rst
@@ -0,0 +1,45 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: :doc:`../../../cpu-freq/index`
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_index.rst:
+
+
+=======================================================
+Linux CPUFreq - Linux(TM)内核中的CPU频率和电压升降代码
+=======================================================
+
+Author: Dominik Brodowski  <linux@brodo.de>
+
+      时钟升降允许你在运行中改变CPU的时钟速度。这是一个很好的节省电池电量的方法,因为时
+      钟速度越低,CPU消耗的电量越少。
+
+
+.. toctree::
+   :maxdepth: 1
+
+   core
+   cpu-drivers
+   cpufreq-stats
+
+邮件列表
+------------
+这里有一个 CPU 频率变化的 CVS 提交和通用列表,您可以在这里报告bug、问题或提交补丁。要发
+布消息,请发送电子邮件到 linux-pm@vger.kernel.org。
+
+链接
+-----
+FTP档案:
+* ftp://ftp.linux.org.uk/pub/linux/cpufreq/
+
+如何访问CVS仓库:
+* http://cvs.arm.linux.org.uk/
+
+CPUFreq邮件列表:
+* http://vger.kernel.org/vger-lists.html#linux-pm
+
+SA-1100的时钟和电压标度:
+* http://www.lartmaker.nl/projects/scaling
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 5/8] docs/zh_CN: add cpu-freq to zh_CN index
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
                   ` (3 preceding siblings ...)
  2021-03-29  2:51 ` [PATCH v2 4/8] docs/zh_CN: add cpu-freq index.rst translation Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 6/8] docs/zh_CN: add mips " Yanteng Si
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

All the files in the cpu-freq directory have been translated into
Chinese and it is time to add them to the zh_CN index.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 Documentation/translations/zh_CN/index.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/translations/zh_CN/index.rst b/Documentation/translations/zh_CN/index.rst
index 2767dacfe86d..cd55c1aea604 100644
--- a/Documentation/translations/zh_CN/index.rst
+++ b/Documentation/translations/zh_CN/index.rst
@@ -21,6 +21,7 @@
    filesystems/index
    arm64/index
    sound/index
+   cpu-freq/index
 
 目录和表格
 ----------
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 6/8] docs/zh_CN: add mips to zh_CN index
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
                   ` (4 preceding siblings ...)
  2021-03-29  2:51 ` [PATCH v2 5/8] docs/zh_CN: add cpu-freq to zh_CN index Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 7/8] docs/zh_CN: add iio " Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 8/8] docs/zh_CN: add riscv " Yanteng Si
  7 siblings, 0 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

All the files in the mips directory have been translated into
Chinese and it is time to add them to the zh_CN index.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 Documentation/translations/zh_CN/index.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/translations/zh_CN/index.rst b/Documentation/translations/zh_CN/index.rst
index cd55c1aea604..16641203dc88 100644
--- a/Documentation/translations/zh_CN/index.rst
+++ b/Documentation/translations/zh_CN/index.rst
@@ -22,6 +22,7 @@
    arm64/index
    sound/index
    cpu-freq/index
+   mips/index
 
 目录和表格
 ----------
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 7/8] docs/zh_CN: add iio to zh_CN index
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
                   ` (5 preceding siblings ...)
  2021-03-29  2:51 ` [PATCH v2 6/8] docs/zh_CN: add mips " Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  2021-03-29  2:51 ` [PATCH v2 8/8] docs/zh_CN: add riscv " Yanteng Si
  7 siblings, 0 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

All the files in the iio directory have been translated into
Chinese and it is time to add them to the zh_CN index.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 Documentation/translations/zh_CN/index.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/translations/zh_CN/index.rst b/Documentation/translations/zh_CN/index.rst
index 16641203dc88..51c50f319487 100644
--- a/Documentation/translations/zh_CN/index.rst
+++ b/Documentation/translations/zh_CN/index.rst
@@ -23,6 +23,7 @@
    sound/index
    cpu-freq/index
    mips/index
+   iio/index
 
 目录和表格
 ----------
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 8/8] docs/zh_CN: add riscv to zh_CN index
  2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
                   ` (6 preceding siblings ...)
  2021-03-29  2:51 ` [PATCH v2 7/8] docs/zh_CN: add iio " Yanteng Si
@ 2021-03-29  2:51 ` Yanteng Si
  7 siblings, 0 replies; 15+ messages in thread
From: Yanteng Si @ 2021-03-29  2:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: alexs, Alex Shi, Huacai Chen, Jiaxun Yang, Harry Wei, linux-doc,
	realpuyuwang, siyanteng01, Wu X . C .,
	Yanteng Si

All the files in the riscv directory have been translated into
Chinese and it is time to add them to the zh_CN index.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 Documentation/translations/zh_CN/index.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/translations/zh_CN/index.rst b/Documentation/translations/zh_CN/index.rst
index 51c50f319487..892b6e85a8aa 100644
--- a/Documentation/translations/zh_CN/index.rst
+++ b/Documentation/translations/zh_CN/index.rst
@@ -24,6 +24,7 @@
    cpu-freq/index
    mips/index
    iio/index
+   riscv/index
 
 目录和表格
 ----------
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation
  2021-03-29  2:51 ` [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation Yanteng Si
@ 2021-03-29  6:21   ` Wu X.C.
  2021-03-29 12:05     ` yanteng si
  0 siblings, 1 reply; 15+ messages in thread
From: Wu X.C. @ 2021-03-29  6:21 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Jonathan Corbet, Alex Shi, Alex Shi, Huacai Chen, Jiaxun Yang,
	Harry Wei, linux-doc, realpuyuwang, siyanteng01

Hi,

On Mon, Mar 29, 2021 at 10:51:38AM +0800, Yanteng Si wrote:
> This patch translates Documention/cpu-freq/cpu-drivers.rst into Chinese.
> 
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  .../zh_CN/cpu-freq/cpu-drivers.rst            | 259 ++++++++++++++++++
>  1 file changed, 259 insertions(+)
>  create mode 100644 Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
> 
> diff --git a/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst b/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
[...]
> +1.5. target/target_index
> +------------------------
> +
> +target_index调用有两个参数/:``struct cpufreq_policy * policy``和``unsigned int``

"s/。/:/" means use ':' to replace '。' ;
aka "s/{0}/{1}/" means use {1} to replace {0}, this is a sed command.
So, please delete the '/' .

[...]
> +
> +如果你需要在driver_freq_table中处理pos的位置,不要减去指针,因为它的代价相当高。相反,使用宏
> +  cpufreq_for_each_entry_idx() 和 cpufreq_for_each_valid_entry_idx() 。

The spaces in the begin are also redundant.

And one more thing:
  The numbers of columns are very random, if someone read the rst files
  <http://fars.ee/sqoL.png>
  instead of html files, that may cause difficulties. Please use a
  monospaced font to fix the problem, try to keep in 74-80 columns
  except meet a long English word, one Chinese character use 2 columns.

  This comment is for all patches.

Thanks!

Wu X.C.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation
  2021-03-29  2:51 ` [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation Yanteng Si
@ 2021-03-29  6:23   ` Wu X.C.
  2021-03-29 12:19     ` yanteng si
  0 siblings, 1 reply; 15+ messages in thread
From: Wu X.C. @ 2021-03-29  6:23 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Jonathan Corbet, Alex Shi, Alex Shi, Huacai Chen, Jiaxun Yang,
	Harry Wei, linux-doc, realpuyuwang, siyanteng01

On Mon, Mar 29, 2021 at 10:51:39AM +0800, Yanteng Si wrote:
> This patch translates Documention/cpu-freq/cpufreq-stats.rst into Chinese.
> 
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  .../zh_CN/cpu-freq/cpufreq-stats.rst          | 130 ++++++++++++++++++
>  1 file changed, 130 insertions(+)
>  create mode 100644 Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
> 
> diff --git a/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst b/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
> new file mode 100644
> index 000000000000..d21a317d9659
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
> @@ -0,0 +1,130 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +.. include:: ../disclaimer-zh_CN.rst
> +
> +:Original: :doc:`../../../cpu-freq/cpufreq-stats`
> +:Translator: Yanteng Si <siyanteng@loongson.cn>
> +
> +.. _cn_cpufreq-stats.rst:
> +
> +
> +==========================================
> +sysfs CPUFreq Stats的一般说明
> +==========================================
> +
> +用户信息
> +
> +
> +作者: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> +
> +.. Contents
> +
> +   1. 简介
> +   2. 提供的统计数据(举例说明)
> +   3. 配置cpufreq-stats
> +
> +
> +1. 简介
> +===============
> +
> +cpufreq-stats是一个为每个CPU提供CPU频率统计的驱动。
> +这些统计数据在/sysfs中以一堆只读接口的形式提供。这个接口(在配置好后)将出现在
> +/sysfs(<sysfs root>/devices/system/cpu/cpuX/cpufreq/stats/)中cpufreq下的一个单
> +独的目录中,提供给每个CPU。
> +各种统计数据将在此目录下形成只读文件。
> +
> +此驱动是独立于任何可能运行在你所用CPU上的特定cpufreq_driver而设计的。因此,它将与所有
> +cpufreq_driver一起工作。
> +
> +
> +2. 提供的统计数据(举例说明)
> +=====================================
> +
> +cpufreq stats提供了以下统计数据(在下面详细解释)。
> +
> +-  time_in_state
> +-  total_trans
> +-  trans_table
> +
> +所有的统计数据将从统计驱动被载入的时间(或统计被重置的时间)开始,到某一统计数据被读取的时间为止。

You changed 'insert' in this sentence.
And next?

> +显然,统计驱动不会有任何关于统计驱动插入之前的频率转换信息。
                                       ^^^^
All others are look good to me.

Thanks!

Wu X.C.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation
  2021-03-29  6:21   ` Wu X.C.
@ 2021-03-29 12:05     ` yanteng si
  0 siblings, 0 replies; 15+ messages in thread
From: yanteng si @ 2021-03-29 12:05 UTC (permalink / raw)
  To: Wu X.C.
  Cc: Yanteng Si, Jonathan Corbet, Alex Shi, Alex Shi, Huacai Chen,
	Jiaxun Yang, Harry Wei, linux-doc, Puyu Wang

Wu X.C. <bobwxc@email.cn> 于2021年3月29日周一 下午2:21写道:
>
> Hi,
>
> On Mon, Mar 29, 2021 at 10:51:38AM +0800, Yanteng Si wrote:
> > This patch translates Documention/cpu-freq/cpu-drivers.rst into Chinese.
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> >  .../zh_CN/cpu-freq/cpu-drivers.rst            | 259 ++++++++++++++++++
> >  1 file changed, 259 insertions(+)
> >  create mode 100644 Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
> >
> > diff --git a/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst b/Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
> [...]
> > +1.5. target/target_index
> > +------------------------
> > +
> > +target_index调用有两个参数/:``struct cpufreq_policy * policy``和``unsigned int``
>
> "s/。/:/" means use ':' to replace '。' ;
> aka "s/{0}/{1}/" means use {1} to replace {0}, this is a sed command.
> So, please delete the '/' .
OK!
>
> [...]
> > +
> > +如果你需要在driver_freq_table中处理pos的位置,不要减去指针,因为它的代价相当高。相反,使用宏
> > +  cpufreq_for_each_entry_idx() 和 cpufreq_for_each_valid_entry_idx() 。
>
> The spaces in the begin are also redundant.
>
OK!
> And one more thing:
>   The numbers of columns are very random, if someone read the rst files
>   <http://fars.ee/sqoL.png>
>   instead of html files, that may cause difficulties. Please use a
>   monospaced font to fix the problem, try to keep in 74-80 columns
>   except meet a long English word, one Chinese character use 2 columns.
>
>   This comment is for all patches.
>
> Thanks!
>
> Wu X.C.
>
Thanks!

Yanteng

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation
  2021-03-29  6:23   ` Wu X.C.
@ 2021-03-29 12:19     ` yanteng si
  2021-03-29 13:13       ` Wu X.C.
  0 siblings, 1 reply; 15+ messages in thread
From: yanteng si @ 2021-03-29 12:19 UTC (permalink / raw)
  To: Wu X.C.
  Cc: Yanteng Si, Jonathan Corbet, Alex Shi, Alex Shi, Huacai Chen,
	Jiaxun Yang, Harry Wei, linux-doc, Puyu Wang

Hi~

Do you mind if I add the following?

+:校译:
+
+ 吴想成 Wu XiangCheng <bobwxc@email.cn>

Wu X.C. <bobwxc@email.cn> 于2021年3月29日周一 下午2:23写道:
>
> On Mon, Mar 29, 2021 at 10:51:39AM +0800, Yanteng Si wrote:
> > This patch translates Documention/cpu-freq/cpufreq-stats.rst into Chinese.
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> >  .../zh_CN/cpu-freq/cpufreq-stats.rst          | 130 ++++++++++++++++++
> >  1 file changed, 130 insertions(+)
> >  create mode 100644 Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
> >
> > diff --git a/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst b/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
> > new file mode 100644
> > index 000000000000..d21a317d9659
> > --- /dev/null
> > +++ b/Documentation/translations/zh_CN/cpu-freq/cpufreq-stats.rst
> > @@ -0,0 +1,130 @@
> > +.. SPDX-License-Identifier: GPL-2.0
> > +
> > +.. include:: ../disclaimer-zh_CN.rst
> > +
> > +:Original: :doc:`../../../cpu-freq/cpufreq-stats`
> > +:Translator: Yanteng Si <siyanteng@loongson.cn>
> > +
> > +.. _cn_cpufreq-stats.rst:
> > +
> > +
> > +==========================================
> > +sysfs CPUFreq Stats的一般说明
> > +==========================================
> > +
> > +用户信息
> > +
> > +
> > +作者: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> > +
> > +.. Contents
> > +
> > +   1. 简介
> > +   2. 提供的统计数据(举例说明)
> > +   3. 配置cpufreq-stats
> > +
> > +
> > +1. 简介
> > +===============
> > +
> > +cpufreq-stats是一个为每个CPU提供CPU频率统计的驱动。
> > +这些统计数据在/sysfs中以一堆只读接口的形式提供。这个接口(在配置好后)将出现在
> > +/sysfs(<sysfs root>/devices/system/cpu/cpuX/cpufreq/stats/)中cpufreq下的一个单
> > +独的目录中,提供给每个CPU。
> > +各种统计数据将在此目录下形成只读文件。
> > +
> > +此驱动是独立于任何可能运行在你所用CPU上的特定cpufreq_driver而设计的。因此,它将与所有
> > +cpufreq_driver一起工作。
> > +
> > +
> > +2. 提供的统计数据(举例说明)
> > +=====================================
> > +
> > +cpufreq stats提供了以下统计数据(在下面详细解释)。
> > +
> > +-  time_in_state
> > +-  total_trans
> > +-  trans_table
> > +
> > +所有的统计数据将从统计驱动被载入的时间(或统计被重置的时间)开始,到某一统计数据被读取的时间为止。
>
> You changed 'insert' in this sentence.
> And next?
>
> > +显然,统计驱动不会有任何关于统计驱动插入之前的频率转换信息。
v3: 插入 = 载入
OK!
>                                        ^^^^
> All others are look good to me.
>
> Thanks!
>
> Wu X.C.
>

Thank!

Yanteng

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation
  2021-03-29 12:19     ` yanteng si
@ 2021-03-29 13:13       ` Wu X.C.
  2021-04-01  4:48         ` Alex Shi
  0 siblings, 1 reply; 15+ messages in thread
From: Wu X.C. @ 2021-03-29 13:13 UTC (permalink / raw)
  To: yanteng si
  Cc: Yanteng Si, Jonathan Corbet, Alex Shi, Alex Shi, Huacai Chen,
	Jiaxun Yang, Harry Wei, linux-doc, Puyu Wang

On Mon, Mar 29, 2021 at 08:19:23PM +0800, yanteng si wrote:
> Hi~
> 
> Do you mind if I add the following?
> 
> +:校译:
> +
> + 吴想成 Wu XiangCheng <bobwxc@email.cn>

Ah, thank you very much.

I really appreciate your willingness to do so. It's really an honor, 
but I have only done some minor work. :) Just put it on hold. 
Many people will review your works continually. If someone modify your 
translation later, add them.

Sincerely,
Wu X.C.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation
  2021-03-29 13:13       ` Wu X.C.
@ 2021-04-01  4:48         ` Alex Shi
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Shi @ 2021-04-01  4:48 UTC (permalink / raw)
  To: Wu X.C., yanteng si
  Cc: Yanteng Si, Jonathan Corbet, Alex Shi, Alex Shi, Huacai Chen,
	Jiaxun Yang, Harry Wei, linux-doc, Puyu Wang



On 2021/3/29 下午9:13, Wu X.C. wrote:
> On Mon, Mar 29, 2021 at 08:19:23PM +0800, yanteng si wrote:
>> Hi~
>>
>> Do you mind if I add the following?
>>
>> +:校译:
>> +
>> + 吴想成 Wu XiangCheng <bobwxc@email.cn>
> 
> Ah, thank you very much.
> 
> I really appreciate your willingness to do so. It's really an honor, 
> but I have only done some minor work. :) Just put it on hold. 
> Many people will review your works continually. If someone modify your 
> translation later, add them.

Hi Xiangcheng,

You are so humble. :)
Compare to a honor of your sign, I'd like to see more responsibility from
the signing. So please take it if it's passed your review. And also a 
"reviewed-by:" is another kind of generous commitment. :)

Thanks
Alex
 
> 
> Sincerely,
> Wu X.C.
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-04-01  4:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29  2:51 [PATCH v2 0/8] docs/zh_CN: add cpu-freq translation Yanteng Si
2021-03-29  2:51 ` [PATCH v2 1/8] docs/zh_CN: add cpu-freq core.rst translation Yanteng Si
2021-03-29  2:51 ` [PATCH v2 2/8] docs/zh_CN: add cpu-freq cpu-drivers.rst translation Yanteng Si
2021-03-29  6:21   ` Wu X.C.
2021-03-29 12:05     ` yanteng si
2021-03-29  2:51 ` [PATCH v2 3/8] docs/zh_CN: add cpu-freq cpufreq-stats.rst translation Yanteng Si
2021-03-29  6:23   ` Wu X.C.
2021-03-29 12:19     ` yanteng si
2021-03-29 13:13       ` Wu X.C.
2021-04-01  4:48         ` Alex Shi
2021-03-29  2:51 ` [PATCH v2 4/8] docs/zh_CN: add cpu-freq index.rst translation Yanteng Si
2021-03-29  2:51 ` [PATCH v2 5/8] docs/zh_CN: add cpu-freq to zh_CN index Yanteng Si
2021-03-29  2:51 ` [PATCH v2 6/8] docs/zh_CN: add mips " Yanteng Si
2021-03-29  2:51 ` [PATCH v2 7/8] docs/zh_CN: add iio " Yanteng Si
2021-03-29  2:51 ` [PATCH v2 8/8] docs/zh_CN: add riscv " Yanteng Si

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.