157 lines · plain
1What: /sys/block/<disk>/bcache/unregister2Date: November 20103Contact: Kent Overstreet <kent.overstreet@gmail.com>4Description:5 A write to this file causes the backing device or cache to be6 unregistered. If a backing device had dirty data in the cache,7 writeback mode is automatically disabled and all dirty data is8 flushed before the device is unregistered. Caches unregister9 all associated backing devices before unregistering themselves.10 11What: /sys/block/<disk>/bcache/clear_stats12Date: November 201013Contact: Kent Overstreet <kent.overstreet@gmail.com>14Description:15 Writing to this file resets all the statistics for the device.16 17What: /sys/block/<disk>/bcache/cache18Date: November 201019Contact: Kent Overstreet <kent.overstreet@gmail.com>20Description:21 For a backing device that has cache, a symlink to22 the bcache/ dir of that cache.23 24What: /sys/block/<disk>/bcache/cache_hits25Date: November 201026Contact: Kent Overstreet <kent.overstreet@gmail.com>27Description:28 For backing devices: integer number of full cache hits,29 counted per bio. A partial cache hit counts as a miss.30 31What: /sys/block/<disk>/bcache/cache_misses32Date: November 201033Contact: Kent Overstreet <kent.overstreet@gmail.com>34Description:35 For backing devices: integer number of cache misses.36 37What: /sys/block/<disk>/bcache/cache_hit_ratio38Date: November 201039Contact: Kent Overstreet <kent.overstreet@gmail.com>40Description:41 For backing devices: cache hits as a percentage.42 43What: /sys/block/<disk>/bcache/sequential_cutoff44Date: November 201045Contact: Kent Overstreet <kent.overstreet@gmail.com>46Description:47 For backing devices: Threshold past which sequential IO will48 skip the cache. Read and written as bytes in human readable49 units (i.e. echo 10M > sequntial_cutoff).50 51What: /sys/block/<disk>/bcache/bypassed52Date: November 201053Contact: Kent Overstreet <kent.overstreet@gmail.com>54Description:55 Sum of all reads and writes that have bypassed the cache (due56 to the sequential cutoff). Expressed as bytes in human57 readable units.58 59What: /sys/block/<disk>/bcache/writeback60Date: November 201061Contact: Kent Overstreet <kent.overstreet@gmail.com>62Description:63 For backing devices: When on, writeback caching is enabled and64 writes will be buffered in the cache. When off, caching is in65 writethrough mode; reads and writes will be added to the66 cache but no write buffering will take place.67 68What: /sys/block/<disk>/bcache/writeback_running69Date: November 201070Contact: Kent Overstreet <kent.overstreet@gmail.com>71Description:72 For backing devices: when off, dirty data will not be written73 from the cache to the backing device. The cache will still be74 used to buffer writes until it is mostly full, at which point75 writes transparently revert to writethrough mode. Intended only76 for benchmarking/testing.77 78What: /sys/block/<disk>/bcache/writeback_delay79Date: November 201080Contact: Kent Overstreet <kent.overstreet@gmail.com>81Description:82 For backing devices: In writeback mode, when dirty data is83 written to the cache and the cache held no dirty data for that84 backing device, writeback from cache to backing device starts85 after this delay, expressed as an integer number of seconds.86 87What: /sys/block/<disk>/bcache/writeback_percent88Date: November 201089Contact: Kent Overstreet <kent.overstreet@gmail.com>90Description:91 For backing devices: If nonzero, writeback from cache to92 backing device only takes place when more than this percentage93 of the cache is used, allowing more write coalescing to take94 place and reducing total number of writes sent to the backing95 device. Integer between 0 and 40.96 97What: /sys/block/<disk>/bcache/synchronous98Date: November 201099Contact: Kent Overstreet <kent.overstreet@gmail.com>100Description:101 For a cache, a boolean that allows synchronous mode to be102 switched on and off. In synchronous mode all writes are ordered103 such that the cache can reliably recover from unclean shutdown;104 if disabled bcache will not generally wait for writes to105 complete but if the cache is not shut down cleanly all data106 will be discarded from the cache. Should not be turned off with107 writeback caching enabled.108 109What: /sys/block/<disk>/bcache/discard110Date: November 2010111Contact: Kent Overstreet <kent.overstreet@gmail.com>112Description:113 For a cache, a boolean allowing discard/TRIM to be turned off114 or back on if the device supports it.115 116What: /sys/block/<disk>/bcache/bucket_size117Date: November 2010118Contact: Kent Overstreet <kent.overstreet@gmail.com>119Description:120 For a cache, bucket size in human readable units, as set at121 cache creation time; should match the erase block size of the122 SSD for optimal performance.123 124What: /sys/block/<disk>/bcache/nbuckets125Date: November 2010126Contact: Kent Overstreet <kent.overstreet@gmail.com>127Description:128 For a cache, the number of usable buckets.129 130What: /sys/block/<disk>/bcache/tree_depth131Date: November 2010132Contact: Kent Overstreet <kent.overstreet@gmail.com>133Description:134 For a cache, height of the btree excluding leaf nodes (i.e. a135 one node tree will have a depth of 0).136 137What: /sys/block/<disk>/bcache/btree_cache_size138Date: November 2010139Contact: Kent Overstreet <kent.overstreet@gmail.com>140Description:141 Number of btree buckets/nodes that are currently cached in142 memory; cache dynamically grows and shrinks in response to143 memory pressure from the rest of the system.144 145What: /sys/block/<disk>/bcache/written146Date: November 2010147Contact: Kent Overstreet <kent.overstreet@gmail.com>148Description:149 For a cache, total amount of data in human readable units150 written to the cache, excluding all metadata.151 152What: /sys/block/<disk>/bcache/btree_written153Date: November 2010154Contact: Kent Overstreet <kent.overstreet@gmail.com>155Description:156 For a cache, sum of all btree writes in human readable units.157