您的位置:首页 > 其它

Documentation/cpu-freq/boost.txt

2013-11-18 20:17 295 查看
Chinese translated version of Documentation/cpu-freq/boost.txt
If you have any comment or update to the content, please contact the

original document maintainer directly. However, if you have a problem

communicating in English you can also ask the Chinese maintainer for

help. Contact the Chinese maintainer if this translation is outdated

or if there is a problem with the translation.
Chinese maintainer: Liemin Ma <maliemin.jj@gmail.com>

---------------------------------------------------------------------

Documentation/cpu-freq/boost.txt 的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文

交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻

译存在问题,请联系中文版维护者。
中文版维护者: 马列敏 <maliemin.jj@gmail.com>

中文版翻译者: 马列敏<maliemin.jj@gmail.com>

中文版校译者: 马列敏<maliemin.jj@gmail.com>

以下为正文

---------------------------------------------------------------------
Processor boosting control

- information for users -
处理器boost控制,用户信息
Quick guide for the impatient:
快速指南
--------------------
/sys/devices/system/cpu/cpufreq/boost
controls the boost setting for the whole system. You can read and write
that file with either "0" (boosting disabled) or "1" (boosting allowed).
Reading or writing 1 does not mean that the system is boosting at this
very moment, but only that the CPU _may_ raise the frequency at it's
discretion.
/sys/devices/system/cpu/cpufreq/boost
控制boost设置为了整个系统,你可以读或写这个文件用“0”(禁用boost)或“1”(启用boost)。
读或写1并不意味着系统正在boost,仅仅只有cpu会在自己的判断下提高频率。
--------------------

Introduction
介绍
-------------
Some CPUs support a functionality to raise the operating frequency of
some cores in a multi-core package if certain conditions apply, mostly
if the whole chip is not fully utilized and below it's intended thermal
budget. This is done without operating system control by a combination
of hardware and firmware.
On Intel CPUs this is called "Turbo Boost", AMD calls it "Turbo-Core",
in technical documentation "Core performance boost". In Linux we use
the term "boost" for convenience.

如果特定的条件支持的话,一些cpu支持一种功能,去提高一些在一个多核心包中的核的操作频率,大多数是在芯片未完全利用且低于预期的热预算(产热在支持范围内)的情况下。这些完成是不需要操作系统的控制的,而是硬件和固件完成的。
在因特尔处理器上这被称为“Turbo Boost”,
AMD处理器称它为“Turbo-Core”,在科技文档中称为“Core
performance boost”。在linux中,为了方便,我们称它“boost”。

Rationale for disable switch
禁用开关的理由
----------------------------

Though the idea is to just give better performance without any user
intervention, sometimes the need arises to disable this functionality.
Most systems offer a switch in the (BIOS)firmware to disable the
functionality at all, but a more fine-grained and dynamic control would
be desirable:
虽然这个想法只是给出更好的性能,而没有用户的介入,但是有时,也出现了禁用这个功能的需求。大多数系统在固件中(BIOS)提供了一个开关来完全禁用这个功能,但是一个更细粒度的且动态控制的方法更好。
1. While running benchmarks, reproducible results are important. Since
the boosting functionality depends on the load of the whole package,
single thread performance can vary. By explicitly disabling the boost
functionality at least for the benchmark's run-time the system will run
at a fixed frequency and results are reproducible again.
当运行标准检查程序,可复写的结果十分重要。因为boost功能依赖于整个包的载入,单线程的性能会变化不定。通过确保禁用boost功能,至少在运行检查标准程序时,系统会运行在一个固定的频率,并且结果会重现。
2. To examine the impact of the boosting functionality it is helpful
to do tests with and without boosting.
用或者不用boost来做测试,是对检测boost功能的影响,十分有帮助的。
3. Boosting means overclocking the processor,though under controlled
conditions. By raising the frequency and the voltage the processor
will consume more power than without the boosting, which may be
undesirable for instance for mobile users.Disabling boosting may
save power here, though this depends on the workload.

boost意味着处理器超频工作,虽然是在受控制的条件下。通过提高频率和电压,处理器会比不用boost消耗更多的电。这样可能对移动用户会不太好。禁用boost可能会节省电能,虽然这取决于工作量。
User controlled switch
用户控制开关
----------------------

To allow the user to toggle the boosting functionality, the acpi-cpufreq
driver exports a sysfs knob to disable it.There is a file:
/sys/devices/system/cpu/cpufreq/boost
which can either read "0" (boosting disabled) or "1" (boosting enabled).
Reading the file is always supported, even if the processor does not
support boosting. In this case the file will be read-only and always
reads as "0". Explicitly changing the permissions and writing to that
file anyway will return EINVAL.
为了允许用户切换boost功能,[b]acpi-cpufreq驱动器输出一个sysfs来禁用它。有一个文件:[/b]
[b] /sys/devices/system/cpu/cpufreq/boost

[/b]
[b]它可以被读为“0”(禁用boost)或“1”(启用boost)。读取这个文件总是被支持的,即使在不支持boost的情况下。在这种情况下这个文件会是只读的并且总是被读为“0”,如果改变权限强行写入那个文件将会返回错误EINVAD。[/b]
On supported CPUs one can write either a"0" or a "1" into this file.
This will either disable the boost functionality on all cores in the
whole system (0) or will allow the hardware to boost at will (1).
在支持boost的cpu上,则可以写“0”或“1”在那个文件里。这将会在整个系统所有的核上禁用boost功能(0)或将会允许硬件boost(1)。
Writing a "1" does not explicitly boost the system, but just allows the
CPU (and the firmware) to boost at their discretion. Some implementations
take external factors like the chip's temperature into account, so
boosting once does not necessarily mean that it will occur every time
even using the exact same software setup.
写入“1”并不是boost系统,而是允许cpu(还有固件)在自己的判断下boost。
一些实现还把一些外部考虑进来了,比如芯片的温度,所以boost一次并不意味着它会每次都出现,即使用一些软件来启动。
AMD legacy cpb switch
AMD cpb开关
---------------------
The AMD powernow-k8 driver used to support a very similar switch to
disable or enable the "Core Performance Boost" feature of some AMD CPUs.
This switch was instantiated in each CPU's cpufreq directory
(/sys/devices/system/cpu[0-9]*/cpufreq) and was called "cpb".
Though the per CPU existence hints at a more fine grained control, the
actual implementation only supported a system-global switch semantics,
which was simply reflected into each CPU's file. Writing a 0 or 1 into it
would pull the other CPUs to the same state.
For compatibility reasons this file and its behavior is still supported
on AMD CPUs, though it is now protected by aconfig switch
(X86_ACPI_CPUFREQ_CPB). On Intel CPUs this file will never be created,
even with the config option set.
This functionality is considered legacy and will be removed in some future
kernel version.
AMD powernow-k8驱动器过去支持一种非常类似的开关,来禁用或启用一些AMD cpu的[b] "Core Performance Boost"特性。举例来说,这个开关在每个cpu的cpufreq路径下[b] (/sys/devices/system/cpu[0-9]*/cpufreq),并且被称为“cpb”。虽然每个cpu的存在表明一个更细粒度的控制,但是实际的实现只支持一个系统全局开关,它只是简单的映射到每一个cpu的文件里。写入0或1会使其他的cpu同样的状态。[/b][/b]
出于兼容性考虑,在AMDcpu上这个文件和它的操作仍是被支持的,虽然它现在被一个配置开关保护[b] (X86_ACPI_CPUFREQ_CPB)。在因特尔cpu上这个文件将不会被创建,即使设置了配置选项。[/b]
[b]这个功能被认为是旧时的,将会在将来的内核版本中移除。[/b]
More fine grained boosting control
更细粒度的boost控制
----------------------------------

Technically it is possible to switch the boosting functionality at least
on a per package basis, for some CPUs even per core. Currently the driver
does not support it, but this may be implemented in the future.
至少在每个包基础上开关boost功能,这在技术上是可能的,并且甚至在每个核上。现在驱动器并不支持,将来可能会实现。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: