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