block, documentation: Sort queue sysfs attribute names alphabetically
[linux-2.6-block.git] / Documentation / block / queue-sysfs.txt
CommitLineData
cbb5901b
JA
1Queue sysfs files
2=================
3
4This text file will detail the queue files that are located in the sysfs tree
5for each block device. Note that stacked devices typically do not export
6any settings, since their queue merely functions are a remapping target.
7These files are the ones found in the /sys/block/xxx/queue/ directory.
8
9Files denoted with a RO postfix are readonly and the RW postfix means
10read-write.
11
4004e90c
NJ
12add_random (RW)
13----------------
db4ced14 14This file allows to turn off the disk entropy contribution. Default
4004e90c
NJ
15value of this file is '1'(on).
16
6728ac33
BVA
17chunk_sectors (RO)
18------------------
19This has different meaning depending on the type of the block device.
20For a RAID device (dm-raid), chunk_sectors indicates the size in 512B sectors
21of the RAID volume stripe segment. For a zoned block device, either host-aware
22or host-managed, chunk_sectors indicates the size in 512B sectors of the zones
23of the device, with the eventual exception of the last zone of the device which
24may be smaller.
25
005411ea
JL
26dax (RO)
27--------
28This file indicates whether the device supports Direct Access (DAX),
29used by CPU-addressable storage to bypass the pagecache. It shows '1'
30if true, '0' if not.
31
4004e90c
NJ
32discard_granularity (RO)
33-----------------------
34This shows the size of internal allocation of the device in bytes, if
35reported by the device. A value of '0' means device does not support
36the discard functionality.
37
0034af03 38discard_max_hw_bytes (RO)
4004e90c
NJ
39----------------------
40Devices that support discard functionality may have internal limits on
41the number of bytes that can be trimmed or unmapped in a single operation.
42The discard_max_bytes parameter is set by the device driver to the maximum
43number of bytes that can be discarded in a single operation. Discard
44requests issued to the device must not exceed this limit. A discard_max_bytes
45value of 0 means that the device does not support discard functionality.
46
0034af03
JA
47discard_max_bytes (RW)
48----------------------
49While discard_max_hw_bytes is the hardware limit for the device, this
50setting is the software limit. Some devices exhibit large latencies when
51large discards are issued, setting this value lower will make Linux issue
52smaller discards and potentially help reduce latencies induced by large
53discard operations.
54
cbb5901b
JA
55hw_sector_size (RO)
56-------------------
57This is the hardware sector size of the device, in bytes.
58
005411ea
JL
59io_poll (RW)
60------------
7158339d
JM
61When read, this file shows whether polling is enabled (1) or disabled
62(0). Writing '0' to this file will disable polling for this device.
63Writing any non-zero value will enable this feature.
005411ea 64
10e6246e
JA
65io_poll_delay (RW)
66------------------
67If polling is enabled, this controls what kind of polling will be
68performed. It defaults to -1, which is classic polling. In this mode,
69the CPU will repeatedly ask for completions without giving up any time.
70If set to 0, a hybrid polling mode is used, where the kernel will attempt
71to make an educated guess at when the IO will complete. Based on this
72guess, the kernel will put the process issuing IO to sleep for an amount
73of time, before entering a classic poll loop. This mode might be a
74little slower than pure classic polling, but it will be more efficient.
75If set to a value larger than 0, the kernel will put the process issuing
f9824952 76IO to sleep for this amount of microseconds before entering classic
10e6246e
JA
77polling.
78
bb351aba
WZ
79io_timeout (RW)
80---------------
81io_timeout is the request timeout in milliseconds. If a request does not
82complete in this time then the block driver timeout handler is invoked.
83That timeout handler can decide to retry the request, to fail it or to start
84a device recovery strategy.
85
4004e90c
NJ
86iostats (RW)
87-------------
88This file is used to control (on/off) the iostats accounting of the
89disk.
90
91logical_block_size (RO)
92-----------------------
141fd28c 93This is the logical block size of the device, in bytes.
4004e90c 94
cbb5901b
JA
95max_hw_sectors_kb (RO)
96----------------------
97This is the maximum number of kilobytes supported in a single data transfer.
98
4004e90c
NJ
99max_integrity_segments (RO)
100---------------------------
101When read, this file shows the max limit of integrity segments as
102set by block layer which a hardware controller can handle.
103
cbb5901b
JA
104max_sectors_kb (RW)
105-------------------
106This is the maximum number of kilobytes that the block layer will allow
107for a filesystem request. Must be smaller than or equal to the maximum
108size allowed by the hardware.
109
4004e90c
NJ
110max_segments (RO)
111-----------------
112Maximum number of segments of the device.
113
114max_segment_size (RO)
115---------------------
116Maximum segment size of the device.
117
118minimum_io_size (RO)
119--------------------
db4ced14 120This is the smallest preferred IO size reported by the device.
4004e90c 121
cbb5901b
JA
122nomerges (RW)
123-------------
488991e2
AB
124This enables the user to disable the lookup logic involved with IO
125merging requests in the block layer. By default (0) all merges are
126enabled. When set to 1 only simple one-hit merges will be tried. When
127set to 2 no merge algorithms will be tried (including one-hit or more
128complex tree/hash lookups).
cbb5901b
JA
129
130nr_requests (RW)
131----------------
132This controls how many requests may be allocated in the block layer for
133read or write requests. Note that the total allocated number may be twice
134this amount, since it applies only to reads or writes (not the accumulated
135sum).
136
a051661c
TH
137To avoid priority inversion through request starvation, a request
138queue maintains a separate request pool per each cgroup when
139CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such
140per-block-cgroup request pool. IOW, if there are N block cgroups,
f884ab15 141each request queue may have up to N request pools, each independently
a051661c
TH
142regulated by nr_requests.
143
6728ac33
BVA
144nr_zones (RO)
145-------------
146For zoned block devices (zoned attribute indicating "host-managed" or
147"host-aware"), this indicates the total number of zones of the device.
148This is always 0 for regular block devices.
149
4004e90c
NJ
150optimal_io_size (RO)
151--------------------
db4ced14 152This is the optimal IO size reported by the device.
4004e90c
NJ
153
154physical_block_size (RO)
155------------------------
156This is the physical block size of device, in bytes.
157
cbb5901b
JA
158read_ahead_kb (RW)
159------------------
160Maximum number of kilobytes to read-ahead for filesystems on this block
161device.
162
4004e90c
NJ
163rotational (RW)
164---------------
165This file is used to stat if the device is of rotational type or
166non-rotational type.
167
cbb5901b
JA
168rq_affinity (RW)
169----------------
5757a6d7
DW
170If this option is '1', the block layer will migrate request completions to the
171cpu "group" that originally submitted the request. For some workloads this
172provides a significant reduction in CPU cycles due to caching effects.
173
174For storage configurations that need to maximize distribution of completion
175processing setting this option to '2' forces the completion to run on the
176requesting cpu (bypassing the "group" aggregation logic).
cbb5901b
JA
177
178scheduler (RW)
179--------------
180When read, this file will display the current and available IO schedulers
181for this block device. The currently active IO scheduler will be enclosed
182in [] brackets. Writing an IO scheduler name to this file will switch
183control of this block device to that new IO scheduler. Note that writing
184an IO scheduler name to this file will attempt to load that IO scheduler
185module, if it isn't already present in the system.
186
93e9d8e8
JA
187write_cache (RW)
188----------------
189When read, this file will display whether the device has write back
190caching enabled or not. It will return "write back" for the former
191case, and "write through" for the latter. Writing to this file can
192change the kernels view of the device, but it doesn't alter the
193device state. This means that it might not be safe to toggle the
194setting from "write back" to "write through", since that will also
195eliminate cache flushes issued by the kernel.
cbb5901b 196
005411ea
JL
197write_same_max_bytes (RO)
198-------------------------
199This is the number of bytes the device can write in a single write-same
200command. A value of '0' means write-same is not supported by this
201device.
202
152c7776
BVA
203wbt_lat_usec (RW)
204-----------------
87760e5e
JA
205If the device is registered for writeback throttling, then this file shows
206the target minimum read latency. If this latency is exceeded in a given
207window of time (see wb_window_usec), then the writeback throttling will start
80e091d1
JA
208scaling back writes. Writing a value of '0' to this file disables the
209feature. Writing a value of '-1' to this file resets the value to the
210default setting.
87760e5e 211
297e3d85
SL
212throttle_sample_time (RW)
213-------------------------
214This is the time window that blk-throttle samples data, in millisecond.
215blk-throttle makes decision based on the samplings. Lower time means cgroups
216have more smooth throughput, but higher CPU overhead. This exists only when
217CONFIG_BLK_DEV_THROTTLING_LOW is enabled.
cbb5901b 218
f9824952
DLM
219zoned (RO)
220----------
221This indicates if the device is a zoned block device and the zone model of the
222device if it is indeed zoned. The possible values indicated by zoned are
223"none" for regular block devices and "host-aware" or "host-managed" for zoned
224block devices. The characteristics of host-aware and host-managed zoned block
225devices are described in the ZBC (Zoned Block Commands) and ZAC
226(Zoned Device ATA Command Set) standards. These standards also define the
227"drive-managed" zone model. However, since drive-managed zoned block devices
228do not support zone commands, they will be treated as regular block devices
229and zoned will report "none".
230
cbb5901b 231Jens Axboe <jens.axboe@oracle.com>, February 2009