sysfs-block-bcache 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. What: /sys/block/<disk>/bcache/unregister
  2. Date: November 2010
  3. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  4. Description:
  5. A write to this file causes the backing device or cache to be
  6. unregistered. If a backing device had dirty data in the cache,
  7. writeback mode is automatically disabled and all dirty data is
  8. flushed before the device is unregistered. Caches unregister
  9. all associated backing devices before unregistering themselves.
  10. What: /sys/block/<disk>/bcache/clear_stats
  11. Date: November 2010
  12. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  13. Description:
  14. Writing to this file resets all the statistics for the device.
  15. What: /sys/block/<disk>/bcache/cache
  16. Date: November 2010
  17. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  18. Description:
  19. For a backing device that has cache, a symlink to
  20. the bcache/ dir of that cache.
  21. What: /sys/block/<disk>/bcache/cache_hits
  22. Date: November 2010
  23. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  24. Description:
  25. For backing devices: integer number of full cache hits,
  26. counted per bio. A partial cache hit counts as a miss.
  27. What: /sys/block/<disk>/bcache/cache_misses
  28. Date: November 2010
  29. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  30. Description:
  31. For backing devices: integer number of cache misses.
  32. What: /sys/block/<disk>/bcache/cache_hit_ratio
  33. Date: November 2010
  34. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  35. Description:
  36. For backing devices: cache hits as a percentage.
  37. What: /sys/block/<disk>/bcache/sequential_cutoff
  38. Date: November 2010
  39. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  40. Description:
  41. For backing devices: Threshold past which sequential IO will
  42. skip the cache. Read and written as bytes in human readable
  43. units (i.e. echo 10M > sequntial_cutoff).
  44. What: /sys/block/<disk>/bcache/bypassed
  45. Date: November 2010
  46. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  47. Description:
  48. Sum of all reads and writes that have bypassed the cache (due
  49. to the sequential cutoff). Expressed as bytes in human
  50. readable units.
  51. What: /sys/block/<disk>/bcache/writeback
  52. Date: November 2010
  53. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  54. Description:
  55. For backing devices: When on, writeback caching is enabled and
  56. writes will be buffered in the cache. When off, caching is in
  57. writethrough mode; reads and writes will be added to the
  58. cache but no write buffering will take place.
  59. What: /sys/block/<disk>/bcache/writeback_running
  60. Date: November 2010
  61. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  62. Description:
  63. For backing devices: when off, dirty data will not be written
  64. from the cache to the backing device. The cache will still be
  65. used to buffer writes until it is mostly full, at which point
  66. writes transparently revert to writethrough mode. Intended only
  67. for benchmarking/testing.
  68. What: /sys/block/<disk>/bcache/writeback_delay
  69. Date: November 2010
  70. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  71. Description:
  72. For backing devices: In writeback mode, when dirty data is
  73. written to the cache and the cache held no dirty data for that
  74. backing device, writeback from cache to backing device starts
  75. after this delay, expressed as an integer number of seconds.
  76. What: /sys/block/<disk>/bcache/writeback_percent
  77. Date: November 2010
  78. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  79. Description:
  80. For backing devices: If nonzero, writeback from cache to
  81. backing device only takes place when more than this percentage
  82. of the cache is used, allowing more write coalescing to take
  83. place and reducing total number of writes sent to the backing
  84. device. Integer between 0 and 40.
  85. What: /sys/block/<disk>/bcache/synchronous
  86. Date: November 2010
  87. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  88. Description:
  89. For a cache, a boolean that allows synchronous mode to be
  90. switched on and off. In synchronous mode all writes are ordered
  91. such that the cache can reliably recover from unclean shutdown;
  92. if disabled bcache will not generally wait for writes to
  93. complete but if the cache is not shut down cleanly all data
  94. will be discarded from the cache. Should not be turned off with
  95. writeback caching enabled.
  96. What: /sys/block/<disk>/bcache/discard
  97. Date: November 2010
  98. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  99. Description:
  100. For a cache, a boolean allowing discard/TRIM to be turned off
  101. or back on if the device supports it.
  102. What: /sys/block/<disk>/bcache/bucket_size
  103. Date: November 2010
  104. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  105. Description:
  106. For a cache, bucket size in human readable units, as set at
  107. cache creation time; should match the erase block size of the
  108. SSD for optimal performance.
  109. What: /sys/block/<disk>/bcache/nbuckets
  110. Date: November 2010
  111. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  112. Description:
  113. For a cache, the number of usable buckets.
  114. What: /sys/block/<disk>/bcache/tree_depth
  115. Date: November 2010
  116. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  117. Description:
  118. For a cache, height of the btree excluding leaf nodes (i.e. a
  119. one node tree will have a depth of 0).
  120. What: /sys/block/<disk>/bcache/btree_cache_size
  121. Date: November 2010
  122. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  123. Description:
  124. Number of btree buckets/nodes that are currently cached in
  125. memory; cache dynamically grows and shrinks in response to
  126. memory pressure from the rest of the system.
  127. What: /sys/block/<disk>/bcache/written
  128. Date: November 2010
  129. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  130. Description:
  131. For a cache, total amount of data in human readable units
  132. written to the cache, excluding all metadata.
  133. What: /sys/block/<disk>/bcache/btree_written
  134. Date: November 2010
  135. Contact: Kent Overstreet <kent.overstreet@gmail.com>
  136. Description:
  137. For a cache, sum of all btree writes in human readable units.