blob: 451b6d882b2c182af1e9ce9b28bcd73b1218ae26 [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.
Bernhard M. Wiedemann51d8a7b2013-08-26 14:55:44 -07008 Unit: bytes
Nitin Guptae98419c2010-08-09 22:56:56 +05309
10What: /sys/block/zram<id>/initstate
11Date: August 2010
12Contact: Nitin Gupta <ngupta@vflare.org>
13Description:
Bernhard M. Wiedemann51d8a7b2013-08-26 14:55:44 -070014 The initstate file is read-only and shows the initialization
Nitin Guptae98419c2010-08-09 22:56:56 +053015 state of the device.
16
17What: /sys/block/zram<id>/reset
18Date: August 2010
19Contact: Nitin Gupta <ngupta@vflare.org>
20Description:
Bernhard M. Wiedemann51d8a7b2013-08-26 14:55:44 -070021 The reset file is write-only and allows resetting the
22 device. The reset operation frees all the memory associated
Nitin Guptae98419c2010-08-09 22:56:56 +053023 with this device.
24
Sergey Senozhatskybeca3ec2014-04-07 15:38:14 -070025What: /sys/block/zram<id>/max_comp_streams
26Date: February 2014
27Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
28Description:
29 The max_comp_streams file is read-write and specifies the
30 number of backend's zcomp_strm compression streams (number of
31 concurrent compress operations).
32
Sergey Senozhatskye46b8a02014-04-07 15:38:17 -070033What: /sys/block/zram<id>/comp_algorithm
34Date: February 2014
35Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
36Description:
37 The comp_algorithm file is read-write and lets to show
38 available and selected compression algorithms, change
39 compression algorithm selection.
40
Minchan Kim461a8ee2014-10-09 15:29:55 -070041What: /sys/block/zram<id>/mem_used_max
42Date: August 2014
43Contact: Minchan Kim <minchan@kernel.org>
44Description:
Sergey Senozhatskyc87d1652017-02-22 15:46:45 -080045 The mem_used_max file is write-only and is used to reset
46 the counter of maximum memory zram have consumed to store
47 compressed data. For resetting the value, you should write
48 "0". Otherwise, you could see -EINVAL.
Minchan Kim461a8ee2014-10-09 15:29:55 -070049 Unit: bytes
50
Minchan Kim9ada9da2014-10-09 15:29:53 -070051What: /sys/block/zram<id>/mem_limit
52Date: August 2014
53Contact: Minchan Kim <minchan@kernel.org>
54Description:
Sergey Senozhatskyc87d1652017-02-22 15:46:45 -080055 The mem_limit file is write-only and specifies the maximum
56 amount of memory ZRAM can use to store the compressed data.
57 The limit could be changed in run time and "0" means disable
58 the limit. No limit is the initial state. Unit: bytes
Minchan Kim4e3ba872015-04-15 16:15:36 -070059
60What: /sys/block/zram<id>/compact
61Date: August 2015
62Contact: Minchan Kim <minchan@kernel.org>
63Description:
64 The compact file is write-only and trigger compaction for
65 allocator zrm uses. The allocator moves some objects so that
66 it could free fragment space.
Sergey Senozhatsky2f6a3be2015-04-15 16:16:03 -070067
68What: /sys/block/zram<id>/io_stat
69Date: August 2015
70Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
71Description:
72 The io_stat file is read-only and accumulates device's I/O
73 statistics not accounted by block layer. For example,
74 failed_reads, failed_writes, etc. File format is similar to
75 block layer statistics file format.
Sergey Senozhatsky4f2109f2015-04-15 16:16:06 -070076
77What: /sys/block/zram<id>/mm_stat
78Date: August 2015
79Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
80Description:
81 The mm_stat file is read-only and represents device's mm
82 statistics (orig_data_size, compr_data_size, etc.) in a format
83 similar to block layer statistics file format.
Sergey Senozhatsky623e47f2016-05-20 17:00:02 -070084
85What: /sys/block/zram<id>/debug_stat
86Date: July 2016
87Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
88Description:
89 The debug_stat file is read-only and represents various
90 device's debugging info useful for kernel developers. Its
91 format is not documented intentionally and may change
92 anytime without any notice.