sysfs-block-zram 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. What: /sys/block/zram<id>/disksize
  2. Date: August 2010
  3. Contact: Nitin Gupta <ngupta@vflare.org>
  4. Description:
  5. The disksize file is read-write and specifies the disk size
  6. which represents the limit on the *uncompressed* worth of data
  7. that can be stored in this disk.
  8. Unit: bytes
  9. What: /sys/block/zram<id>/initstate
  10. Date: August 2010
  11. Contact: Nitin Gupta <ngupta@vflare.org>
  12. Description:
  13. The initstate file is read-only and shows the initialization
  14. state of the device.
  15. What: /sys/block/zram<id>/reset
  16. Date: August 2010
  17. Contact: Nitin Gupta <ngupta@vflare.org>
  18. Description:
  19. The reset file is write-only and allows resetting the
  20. device. The reset operation frees all the memory associated
  21. with this device.
  22. What: /sys/block/zram<id>/num_reads
  23. Date: August 2010
  24. Contact: Nitin Gupta <ngupta@vflare.org>
  25. Description:
  26. The num_reads file is read-only and specifies the number of
  27. reads (failed or successful) done on this device.
  28. What: /sys/block/zram<id>/num_writes
  29. Date: August 2010
  30. Contact: Nitin Gupta <ngupta@vflare.org>
  31. Description:
  32. The num_writes file is read-only and specifies the number of
  33. writes (failed or successful) done on this device.
  34. What: /sys/block/zram<id>/invalid_io
  35. Date: August 2010
  36. Contact: Nitin Gupta <ngupta@vflare.org>
  37. Description:
  38. The invalid_io file is read-only and specifies the number of
  39. non-page-size-aligned I/O requests issued to this device.
  40. What: /sys/block/zram<id>/failed_reads
  41. Date: February 2014
  42. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  43. Description:
  44. The failed_reads file is read-only and specifies the number of
  45. failed reads happened on this device.
  46. What: /sys/block/zram<id>/failed_writes
  47. Date: February 2014
  48. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  49. Description:
  50. The failed_writes file is read-only and specifies the number of
  51. failed writes happened on this device.
  52. What: /sys/block/zram<id>/max_comp_streams
  53. Date: February 2014
  54. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  55. Description:
  56. The max_comp_streams file is read-write and specifies the
  57. number of backend's zcomp_strm compression streams (number of
  58. concurrent compress operations).
  59. What: /sys/block/zram<id>/comp_algorithm
  60. Date: February 2014
  61. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  62. Description:
  63. The comp_algorithm file is read-write and lets to show
  64. available and selected compression algorithms, change
  65. compression algorithm selection.
  66. What: /sys/block/zram<id>/notify_free
  67. Date: August 2010
  68. Contact: Nitin Gupta <ngupta@vflare.org>
  69. Description:
  70. The notify_free file is read-only. Depending on device usage
  71. scenario it may account a) the number of pages freed because
  72. of swap slot free notifications or b) the number of pages freed
  73. because of REQ_DISCARD requests sent by bio. The former ones
  74. are sent to a swap block device when a swap slot is freed, which
  75. implies that this disk is being used as a swap disk. The latter
  76. ones are sent by filesystem mounted with discard option,
  77. whenever some data blocks are getting discarded.
  78. What: /sys/block/zram<id>/zero_pages
  79. Date: August 2010
  80. Contact: Nitin Gupta <ngupta@vflare.org>
  81. Description:
  82. The zero_pages file is read-only and specifies number of zero
  83. filled pages written to this disk. No memory is allocated for
  84. such pages.
  85. What: /sys/block/zram<id>/orig_data_size
  86. Date: August 2010
  87. Contact: Nitin Gupta <ngupta@vflare.org>
  88. Description:
  89. The orig_data_size file is read-only and specifies uncompressed
  90. size of data stored in this disk. This excludes zero-filled
  91. pages (zero_pages) since no memory is allocated for them.
  92. Unit: bytes
  93. What: /sys/block/zram<id>/compr_data_size
  94. Date: August 2010
  95. Contact: Nitin Gupta <ngupta@vflare.org>
  96. Description:
  97. The compr_data_size file is read-only and specifies compressed
  98. size of data stored in this disk. So, compression ratio can be
  99. calculated using orig_data_size and this statistic.
  100. Unit: bytes
  101. What: /sys/block/zram<id>/mem_used_total
  102. Date: August 2010
  103. Contact: Nitin Gupta <ngupta@vflare.org>
  104. Description:
  105. The mem_used_total file is read-only and specifies the amount
  106. of memory, including allocator fragmentation and metadata
  107. overhead, allocated for this disk. So, allocator space
  108. efficiency can be calculated using compr_data_size and this
  109. statistic.
  110. Unit: bytes
  111. What: /sys/block/zram<id>/mem_used_max
  112. Date: August 2014
  113. Contact: Minchan Kim <minchan@kernel.org>
  114. Description:
  115. The mem_used_max file is read/write and specifies the amount
  116. of maximum memory zram have consumed to store compressed data.
  117. For resetting the value, you should write "0". Otherwise,
  118. you could see -EINVAL.
  119. Unit: bytes
  120. What: /sys/block/zram<id>/mem_limit
  121. Date: August 2014
  122. Contact: Minchan Kim <minchan@kernel.org>
  123. Description:
  124. The mem_limit file is read/write and specifies the maximum
  125. amount of memory ZRAM can use to store the compressed data. The
  126. limit could be changed in run time and "0" means disable the
  127. limit. No limit is the initial state. Unit: bytes
  128. What: /sys/block/zram<id>/compact
  129. Date: August 2015
  130. Contact: Minchan Kim <minchan@kernel.org>
  131. Description:
  132. The compact file is write-only and trigger compaction for
  133. allocator zrm uses. The allocator moves some objects so that
  134. it could free fragment space.
  135. What: /sys/block/zram<id>/io_stat
  136. Date: August 2015
  137. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  138. Description:
  139. The io_stat file is read-only and accumulates device's I/O
  140. statistics not accounted by block layer. For example,
  141. failed_reads, failed_writes, etc. File format is similar to
  142. block layer statistics file format.
  143. What: /sys/block/zram<id>/mm_stat
  144. Date: August 2015
  145. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  146. Description:
  147. The mm_stat file is read-only and represents device's mm
  148. statistics (orig_data_size, compr_data_size, etc.) in a format
  149. similar to block layer statistics file format.