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