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