1 What: /sys/block/zram<id>/disksize
3 Contact: Nitin Gupta <ngupta@vflare.org>
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.
9 What: /sys/block/zram<id>/initstate
11 Contact: Nitin Gupta <ngupta@vflare.org>
13 The disksize file is read-only and shows the initialization
16 What: /sys/block/zram<id>/reset
18 Contact: Nitin Gupta <ngupta@vflare.org>
20 The disksize file is write-only and allows resetting the
21 device. The reset operation frees all the memory assocaited
24 What: /sys/block/zram<id>/num_reads
26 Contact: Nitin Gupta <ngupta@vflare.org>
28 The num_reads file is read-only and specifies the number of
29 reads (failed or successful) done on this device.
31 What: /sys/block/zram<id>/num_writes
33 Contact: Nitin Gupta <ngupta@vflare.org>
35 The num_writes file is read-only and specifies the number of
36 writes (failed or successful) done on this device.
38 What: /sys/block/zram<id>/invalid_io
40 Contact: Nitin Gupta <ngupta@vflare.org>
42 The invalid_io file is read-only and specifies the number of
43 non-page-size-aligned I/O requests issued to this device.
45 What: /sys/block/zram<id>/failed_reads
47 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
49 The failed_reads file is read-only and specifies the number of
50 failed reads happened on this device.
52 What: /sys/block/zram<id>/failed_writes
54 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
56 The failed_writes file is read-only and specifies the number of
57 failed writes happened on this device.
59 What: /sys/block/zram<id>/max_comp_streams
61 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
63 The max_comp_streams file is read-write and specifies the
64 number of backend's zcomp_strm compression streams (number of
65 concurrent compress operations).
67 What: /sys/block/zram<id>/comp_algorithm
69 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
71 The comp_algorithm file is read-write and lets to show
72 available and selected compression algorithms, change
73 compression algorithm selection.
75 What: /sys/block/zram<id>/notify_free
77 Contact: Nitin Gupta <ngupta@vflare.org>
79 The notify_free file is read-only and specifies the number of
80 swap slot free notifications received by this device. These
81 notifications are send to a swap block device when a swap slot
82 is freed. This statistic is applicable only when this disk is
83 being used as a swap disk.
85 What: /sys/block/zram<id>/discard
87 Contact: Nitin Gupta <ngupta@vflare.org>
89 The discard file is read-only and specifies the number of
90 discard requests received by this device. These requests
91 provide information to block device regarding blocks which are
92 no longer used by filesystem.
94 What: /sys/block/zram<id>/zero_pages
96 Contact: Nitin Gupta <ngupta@vflare.org>
98 The zero_pages file is read-only and specifies number of zero
99 filled pages written to this disk. No memory is allocated for
102 What: /sys/block/zram<id>/orig_data_size
104 Contact: Nitin Gupta <ngupta@vflare.org>
106 The orig_data_size file is read-only and specifies uncompressed
107 size of data stored in this disk. This excludes zero-filled
108 pages (zero_pages) since no memory is allocated for them.
111 What: /sys/block/zram<id>/compr_data_size
113 Contact: Nitin Gupta <ngupta@vflare.org>
115 The compr_data_size file is read-only and specifies compressed
116 size of data stored in this disk. So, compression ratio can be
117 calculated using orig_data_size and this statistic.
120 What: /sys/block/zram<id>/mem_used_total
122 Contact: Nitin Gupta <ngupta@vflare.org>
124 The mem_used_total file is read-only and specifies the amount
125 of memory, including allocator fragmentation and metadata
126 overhead, allocated for this disk. So, allocator space
127 efficiency can be calculated using compr_data_size and this
131 What: /sys/block/zram<id>/mem_limit
133 Contact: Minchan Kim <minchan@kernel.org>
135 The mem_limit file is read/write and specifies the maximum
136 amount of memory ZRAM can use to store the compressed data. The
137 limit could be changed in run time and "0" means disable the
138 limit. No limit is the initial state. Unit: bytes