Documentation/block/queue-sysfs.txt

Chinese translated version of Documentation/00-INDEX

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: LiuLu <541748097@qq.com>
---------------------------------------------------------------------
Documentation/00-INDEX 的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者: 刘璐  <541748097@qq.com>
中文版翻译者: 刘璐  <541748097@qq.com>
中文版校译者: 刘璐  <541748097@qq.com>

 

 

 

 

 

 

 

Queue sysfs files

队列sysfs 文件

 =================

This text file will detail the queue files that are located in the sysfs tree for each block device. Note that stacked devices typically do not export any settings, since their queue merely functions are a remapping target.

这篇文档将要描述每一个块设备中位于sysfs树中的队列文件。注意堆设备通常不会有任何输出,因为它们的队列的功能仅仅是一个重测目标。

These files are the ones found in the /sys/block/xxx/queue/ directory.

这些文件是可以在/sys/block/xxx/queue/ directory中找到的。

Files denoted with a RO postfix are readonly and the RW postfix means
read-write.
RO后缀表示的文件是只读,RW后缀表示读写。

add_random (RW)
----------------
This file allows to trun off the disk entropy contribution. Default
value of this file is '1'(on).
该文件允许真理的磁盘熵的贡献。默认这个文件的​​值是'1'(开)。

discard_granularity (RO)

-----------------------
This shows the size of internal allocation of the device in bytes, if
reported by the device. A value of '0' means device does not support
the discard functionality.
如果设备发出报告,这表明设备内部分配的大小是以字节为单位的,'0'表示设备不支持丢弃功能。
discard_max_bytes (RO)
----------------------
Devices that support discard functionality may have internal limits on
the number of bytes that can be trimmed or unmapped in a single operation.
支持丢弃功能的设备可能有限制内部在单一的操作时可裁减或取消映射的字节数。

The discard_max_bytes parameter is set by the device driver to the maximum
number of bytes that can be discarded in a single operation. Discard
requests issued to the device must not exceed this limit. A discard_max_bytes
value of 0 means that the device does not support discard functionality.
discard_max_bytes的参数是由可以在单一操作中丢弃的最大字节数的设备决定的。放弃向设备发出的请求不能超过这个限制。 discard_max_bytes的
值是"0"意味着该设备不支持丢弃功能。

discard_zeroes_data (RO)

------------------------
When read, this file will show if the discarded block are zeroed by the
device or not. If its value is '1' the blocks are zeroed otherwise not.
读取时,如果丢弃的块被设备置为0或者其他,那么文件将显示。如果值是'1',那么块将置为0或者其他。

hw_sector_size (RO)
-------------------
This is the hardware sector size of the device, in bytes.
这是该设备的硬件扇区大小(以字节为单位)。

iostats (RW)
-------------
This file is used to control (on/off) the iostats accounting of the
disk.
这个文件是用来控制(开/关)磁盘的iostats计算。

logical_block_size (RO)
-----------------------
This is the logcal block size of the device, in bytes.
这是logcal设备的块大小,以字节为单位。

max_hw_sectors_kb (RO)
----------------------
This is the maximum number of kilobytes supported in a single data transfer.
这是在单一的数据传输中支持的最大数目的千字节。

max_integrity_segments (RO)
---------------------------
When read, this file shows the max limit of integrity segments as
set by block layer which a hardware controller can handle.
读取时,这个文件显示的是被硬件控制器处理的块层所决定的完整段的最大限制。

max_sectors_kb (RW)
-------------------
This is the maximum number of kilobytes that the block layer will allow
for a filesystem request. Must be smaller than or equal to the maximum
size allowed by the hardware.
这是千字节块层将允许为一个文件系统请求的最大数目。该值必须小于或等于由硬件允许的最大大小。

max_segments (RO)
-----------------
Maximum number of segments of the device.
设备的段的最大值。


max_segment_size (RO)
---------------------
Maximum segment size of the device.
该设备的最大段大小。

minimum_io_size (RO)
--------------------
This is the smallest preferred io size reported by the device.
这是最小的首选IO大小的设备报告。

nomerges (RW)
-------------
This enables the user to disable the lookup logic involved with IO
merging requests in the block layer. By default (0) all merges are
enabled. When set to 1 only simple one-hit merges will be tried. When
set to 2 no merge algorithms will be tried (including one-hit or more
complex tree/hash lookups).
这使用户能够禁用与IO请求合并在块层中的查找逻辑。默认情况(0)下启用所有合并。当设置为1,只有简单的一击将尝试合并。
当设置为2,无合并算法将被尝试(包括一击中或更复杂的树/哈希查找)。

nr_requests (RW)
----------------
This controls how many requests may be allocated in the block layer for
read or write requests. Note that the total allocated number may be twice
this amount, since it applies only to reads or writes (not the accumulated
sum).
这个控制着可以分配多少个在块层读取或写入的请求。注意分配的总数可能是这数额的两倍,因为它仅适用于读取或写入(不累计)。

To avoid priority inversion through request starvation, a request
queue maintains a separate request pool per each cgroup when
CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such
per-block-cgroup request pool.  IOW, if there are N block cgroups,
each request queue may have up to N request pools, each independently
regulated by nr_requests.
通过请求饥饿来避免优先级反转,当CONFIG_BLK_CGROUP启用时,每个cgroup块,一个请求队列维护一个单独的请求池,
这个参数适用于每个这样的cgroup 块的请求池。IOW,如果有N个cgroup 块,每个请求队列中可能有最多N个请求池,各自单独地由nr_requests监管。

optimal_io_size (RO)
--------------------
This is the optimal io size reported by the device.
这是最佳的IO大小设备报告。

physical_block_size (RO)
------------------------
This is the physical block size of device, in bytes.
这是设备的物理块大小,以字节为单位。

read_ahead_kb (RW)
------------------
Maximum number of kilobytes to read-ahead for filesystems on this block
device.
此块设备上的文件系统预读千字节的最大数量。

rotational (RW)
---------------
This file is used to stat if the device is of rotational type or
non-rotational type.
此文件用于统计该设备是旋转型还是非旋转型。

rq_affinity (RW)
----------------
If this option is '1', the block layer will migrate request completions to the
cpu "group" that originally submitted the request. For some workloads this
provides a significant reduction in CPU cycles due to caching effects.
如果此选项是'1',块层将CPU“组”最初提交的请求完成迁移。对于某些工作负载,由于缓存效果,这可以显著减少CPU周期。

For storage configurations that need to maximize distribution of completion
processing setting this option to '2' forces the completion to run on the
requesting cpu (bypassing the "group" aggregation logic).
对于存储配置,需要最大限度地完成分配,将此选项设置为'2'后强制处理完成运行CPU请求(绕过“群”聚合逻辑)。

scheduler (RW)
--------------
When read, this file will display the current and available IO schedulers
for this block device. The currently active IO scheduler will be enclosed
in [] brackets. Writing an IO scheduler name to this file will switch
control of this block device to that new IO scheduler. Note that writing
an IO scheduler name to this file will attempt to load that IO scheduler
module, if it isn't already present in the system.
读取时,这个文件将显示目前可用此块设备的IO调度。目前活跃的IO调度将括在方括号[]内。IO调度的名字写入到该文件后
将会对这个块设备的新的IO调度进行开关控制,请注意,一个IO调度程序的名称果已经不存在于系统中,则写入到该文件时将试图加载该IO调度模块。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值