blob: f861cbfab6b1a9590963d594c2f28f3de1998ed8 [file] [log] [blame]
Nitin Guptae98419c2010-08-09 22:56:56 +05301What: /sys/block/zram<id>/disksize
2Date: August 2010
3Contact: Nitin Gupta <ngupta@vflare.org>
4Description:
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
9What: /sys/block/zram<id>/initstate
10Date: August 2010
11Contact: Nitin Gupta <ngupta@vflare.org>
12Description:
13 The disksize file is read-only and shows the initialization
14 state of the device.
15
16What: /sys/block/zram<id>/reset
17Date: August 2010
18Contact: Nitin Gupta <ngupta@vflare.org>
19Description:
20 The disksize file is write-only and allows resetting the
21 device. The reset operation frees all the memory assocaited
22 with this device.
23
24What: /sys/block/zram<id>/num_reads
25Date: August 2010
26Contact: Nitin Gupta <ngupta@vflare.org>
27Description:
28 The num_reads file is read-only and specifies the number of
29 reads (failed or successful) done on this device.
30
31What: /sys/block/zram<id>/num_writes
32Date: August 2010
33Contact: Nitin Gupta <ngupta@vflare.org>
34Description:
35 The num_writes file is read-only and specifies the number of
36 writes (failed or successful) done on this device.
37
38What: /sys/block/zram<id>/invalid_io
39Date: August 2010
40Contact: Nitin Gupta <ngupta@vflare.org>
41Description:
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.
44
Sergey Senozhatskyde980e92014-04-07 15:38:14 -070045What: /sys/block/zram<id>/failed_reads
46Date: February 2014
47Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
48Description:
49 The failed_reads file is read-only and specifies the number of
50 failed reads happened on this device.
51
52What: /sys/block/zram<id>/failed_writes
53Date: February 2014
54Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
55Description:
56 The failed_writes file is read-only and specifies the number of
57 failed writes happened on this device.
58
59What: /sys/block/zram<id>/max_comp_streams
60Date: February 2014
61Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
62Description:
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).
66
Sergey Senozhatsky0626b80d2014-04-07 15:38:17 -070067What: /sys/block/zram<id>/comp_algorithm
68Date: February 2014
69Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
70Description:
71 The comp_algorithm file is read-write and lets to show
72 available and selected compression algorithms, change
73 compression algorithm selection.
74
Nitin Guptae98419c2010-08-09 22:56:56 +053075What: /sys/block/zram<id>/notify_free
76Date: August 2010
77Contact: Nitin Gupta <ngupta@vflare.org>
78Description:
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.
84
85What: /sys/block/zram<id>/discard
86Date: August 2010
87Contact: Nitin Gupta <ngupta@vflare.org>
88Description:
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.
93
94What: /sys/block/zram<id>/zero_pages
95Date: August 2010
96Contact: Nitin Gupta <ngupta@vflare.org>
97Description:
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
100 such pages.
101
102What: /sys/block/zram<id>/orig_data_size
103Date: August 2010
104Contact: Nitin Gupta <ngupta@vflare.org>
105Description:
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.
109 Unit: bytes
110
111What: /sys/block/zram<id>/compr_data_size
112Date: August 2010
113Contact: Nitin Gupta <ngupta@vflare.org>
114Description:
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.
118 Unit: bytes
119
120What: /sys/block/zram<id>/mem_used_total
121Date: August 2010
122Contact: Nitin Gupta <ngupta@vflare.org>
123Description:
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
128 statistic.
Jesper Juhlf9028312012-07-20 22:35:17 +0200129 Unit: bytes
Minchan Kim3c854b62014-10-09 15:29:53 -0700130
131What: /sys/block/zram<id>/mem_limit
132Date: August 2014
133Contact: Minchan Kim <minchan@kernel.org>
134Description:
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