sysfs-block-zram 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. What: /sys/block/zram<id>/num_reads
  2. Date: August 2015
  3. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  4. Description:
  5. The num_reads file is read-only and specifies the number of
  6. reads (failed or successful) done on this device.
  7. Now accessible via zram<id>/stat node.
  8. What: /sys/block/zram<id>/num_writes
  9. Date: August 2015
  10. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  11. Description:
  12. The num_writes file is read-only and specifies the number of
  13. writes (failed or successful) done on this device.
  14. Now accessible via zram<id>/stat node.
  15. What: /sys/block/zram<id>/invalid_io
  16. Date: August 2015
  17. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  18. Description:
  19. The invalid_io file is read-only and specifies the number of
  20. non-page-size-aligned I/O requests issued to this device.
  21. Now accessible via zram<id>/io_stat node.
  22. What: /sys/block/zram<id>/failed_reads
  23. Date: August 2015
  24. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  25. Description:
  26. The failed_reads file is read-only and specifies the number of
  27. failed reads happened on this device.
  28. Now accessible via zram<id>/io_stat node.
  29. What: /sys/block/zram<id>/failed_writes
  30. Date: August 2015
  31. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  32. Description:
  33. The failed_writes file is read-only and specifies the number of
  34. failed writes happened on this device.
  35. Now accessible via zram<id>/io_stat node.
  36. What: /sys/block/zram<id>/notify_free
  37. Date: August 2015
  38. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  39. Description:
  40. The notify_free file is read-only. Depending on device usage
  41. scenario it may account a) the number of pages freed because
  42. of swap slot free notifications or b) the number of pages freed
  43. because of REQ_DISCARD requests sent by bio. The former ones
  44. are sent to a swap block device when a swap slot is freed, which
  45. implies that this disk is being used as a swap disk. The latter
  46. ones are sent by filesystem mounted with discard option,
  47. whenever some data blocks are getting discarded.
  48. Now accessible via zram<id>/io_stat node.
  49. What: /sys/block/zram<id>/zero_pages
  50. Date: August 2015
  51. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  52. Description:
  53. The zero_pages file is read-only and specifies number of zero
  54. filled pages written to this disk. No memory is allocated for
  55. such pages.
  56. Now accessible via zram<id>/mm_stat node.
  57. What: /sys/block/zram<id>/orig_data_size
  58. Date: August 2015
  59. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  60. Description:
  61. The orig_data_size file is read-only and specifies uncompressed
  62. size of data stored in this disk. This excludes zero-filled
  63. pages (zero_pages) since no memory is allocated for them.
  64. Unit: bytes
  65. Now accessible via zram<id>/mm_stat node.
  66. What: /sys/block/zram<id>/compr_data_size
  67. Date: August 2015
  68. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  69. Description:
  70. The compr_data_size file is read-only and specifies compressed
  71. size of data stored in this disk. So, compression ratio can be
  72. calculated using orig_data_size and this statistic.
  73. Unit: bytes
  74. Now accessible via zram<id>/mm_stat node.
  75. What: /sys/block/zram<id>/mem_used_total
  76. Date: August 2015
  77. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  78. Description:
  79. The mem_used_total file is read-only and specifies the amount
  80. of memory, including allocator fragmentation and metadata
  81. overhead, allocated for this disk. So, allocator space
  82. efficiency can be calculated using compr_data_size and this
  83. statistic.
  84. Unit: bytes
  85. Now accessible via zram<id>/mm_stat node.
  86. What: /sys/block/zram<id>/mem_used_max
  87. Date: August 2015
  88. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  89. Description:
  90. The mem_used_max file is read/write and specifies the amount
  91. of maximum memory zram have consumed to store compressed data.
  92. For resetting the value, you should write "0". Otherwise,
  93. you could see -EINVAL.
  94. Unit: bytes
  95. Downgraded to write-only node: so it's possible to set new
  96. value only; its current value is stored in zram<id>/mm_stat
  97. node.
  98. What: /sys/block/zram<id>/mem_limit
  99. Date: August 2015
  100. Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  101. Description:
  102. The mem_limit file is read/write and specifies the maximum
  103. amount of memory ZRAM can use to store the compressed data.
  104. The limit could be changed in run time and "0" means disable
  105. the limit. No limit is the initial state. Unit: bytes
  106. Downgraded to write-only node: so it's possible to set new
  107. value only; its current value is stored in zram<id>/mm_stat
  108. node.