sysfs-block-zram 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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>/max_comp_streams
  23. Date: February 2014
  24. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  25. Description:
  26. The max_comp_streams file is read-write and specifies the
  27. number of backend's zcomp_strm compression streams (number of
  28. concurrent compress operations).
  29. What: /sys/block/zram<id>/comp_algorithm
  30. Date: February 2014
  31. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  32. Description:
  33. The comp_algorithm file is read-write and lets to show
  34. available and selected compression algorithms, change
  35. compression algorithm selection.
  36. What: /sys/block/zram<id>/mem_used_max
  37. Date: August 2014
  38. Contact: Minchan Kim <minchan@kernel.org>
  39. Description:
  40. The mem_used_max file is write-only and is used to reset
  41. the counter of maximum memory zram have consumed to store
  42. compressed data. For resetting the value, you should write
  43. "0". Otherwise, you could see -EINVAL.
  44. Unit: bytes
  45. What: /sys/block/zram<id>/mem_limit
  46. Date: August 2014
  47. Contact: Minchan Kim <minchan@kernel.org>
  48. Description:
  49. The mem_limit file is write-only and specifies the maximum
  50. amount of memory ZRAM can use to store the compressed data.
  51. The limit could be changed in run time and "0" means disable
  52. the limit. No limit is the initial state. Unit: bytes
  53. What: /sys/block/zram<id>/compact
  54. Date: August 2015
  55. Contact: Minchan Kim <minchan@kernel.org>
  56. Description:
  57. The compact file is write-only and trigger compaction for
  58. allocator zrm uses. The allocator moves some objects so that
  59. it could free fragment space.
  60. What: /sys/block/zram<id>/io_stat
  61. Date: August 2015
  62. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  63. Description:
  64. The io_stat file is read-only and accumulates device's I/O
  65. statistics not accounted by block layer. For example,
  66. failed_reads, failed_writes, etc. File format is similar to
  67. block layer statistics file format.
  68. What: /sys/block/zram<id>/mm_stat
  69. Date: August 2015
  70. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  71. Description:
  72. The mm_stat file is read-only and represents device's mm
  73. statistics (orig_data_size, compr_data_size, etc.) in a format
  74. similar to block layer statistics file format.
  75. What: /sys/block/zram<id>/debug_stat
  76. Date: July 2016
  77. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  78. Description:
  79. The debug_stat file is read-only and represents various
  80. device's debugging info useful for kernel developers. Its
  81. format is not documented intentionally and may change
  82. anytime without any notice.
  83. What: /sys/block/zram<id>/backing_dev
  84. Date: June 2017
  85. Contact: Minchan Kim <minchan@kernel.org>
  86. Description:
  87. The backing_dev file is read-write and set up backing
  88. device for zram to write incompressible pages.
  89. For using, user should enable CONFIG_ZRAM_WRITEBACK.
  90. What: /sys/block/zram<id>/idle
  91. Date: November 2018
  92. Contact: Minchan Kim <minchan@kernel.org>
  93. Description:
  94. idle file is write-only and mark zram slot as idle.
  95. If system has mounted debugfs, user can see which slots
  96. are idle via /sys/kernel/debug/zram/zram<id>/block_state
  97. What: /sys/block/zram<id>/writeback
  98. Date: November 2018
  99. Contact: Minchan Kim <minchan@kernel.org>
  100. Description:
  101. The writeback file is write-only and trigger idle and/or
  102. huge page writeback to backing device.
  103. What: /sys/block/zram<id>/bd_stat
  104. Date: November 2018
  105. Contact: Minchan Kim <minchan@kernel.org>
  106. Description:
  107. The bd_stat file is read-only and represents backing device's
  108. statistics (bd_count, bd_reads, bd_writes) in a format
  109. similar to block layer statistics file format.
  110. What: /sys/block/zram<id>/writeback_limit_enable
  111. Date: November 2018
  112. Contact: Minchan Kim <minchan@kernel.org>
  113. Description:
  114. The writeback_limit_enable file is read-write and specifies
  115. eanbe of writeback_limit feature. "1" means eable the feature.
  116. No limit "0" is the initial state.
  117. What: /sys/block/zram<id>/writeback_limit
  118. Date: November 2018
  119. Contact: Minchan Kim <minchan@kernel.org>
  120. Description:
  121. The writeback_limit file is read-write and specifies the maximum
  122. amount of writeback ZRAM can do. The limit could be changed
  123. in run time.