f861cbfab6b1a9590963d594c2f28f3de1998ed8
[firefly-linux-kernel-4.4.55.git] / Documentation / ABI / testing / sysfs-block-zram
1 What:           /sys/block/zram<id>/disksize
2 Date:           August 2010
3 Contact:        Nitin Gupta <ngupta@vflare.org>
4 Description:
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
9 What:           /sys/block/zram<id>/initstate
10 Date:           August 2010
11 Contact:        Nitin Gupta <ngupta@vflare.org>
12 Description:
13                 The disksize file is read-only and shows the initialization
14                 state of the device.
15
16 What:           /sys/block/zram<id>/reset
17 Date:           August 2010
18 Contact:        Nitin Gupta <ngupta@vflare.org>
19 Description:
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
24 What:           /sys/block/zram<id>/num_reads
25 Date:           August 2010
26 Contact:        Nitin Gupta <ngupta@vflare.org>
27 Description:
28                 The num_reads file is read-only and specifies the number of
29                 reads (failed or successful) done on this device.
30
31 What:           /sys/block/zram<id>/num_writes
32 Date:           August 2010
33 Contact:        Nitin Gupta <ngupta@vflare.org>
34 Description:
35                 The num_writes file is read-only and specifies the number of
36                 writes (failed or successful) done on this device.
37
38 What:           /sys/block/zram<id>/invalid_io
39 Date:           August 2010
40 Contact:        Nitin Gupta <ngupta@vflare.org>
41 Description:
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
45 What:           /sys/block/zram<id>/failed_reads
46 Date:           February 2014
47 Contact:        Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
48 Description:
49                 The failed_reads file is read-only and specifies the number of
50                 failed reads happened on this device.
51
52 What:           /sys/block/zram<id>/failed_writes
53 Date:           February 2014
54 Contact:        Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
55 Description:
56                 The failed_writes file is read-only and specifies the number of
57                 failed writes happened on this device.
58
59 What:           /sys/block/zram<id>/max_comp_streams
60 Date:           February 2014
61 Contact:        Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
62 Description:
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
67 What:           /sys/block/zram<id>/comp_algorithm
68 Date:           February 2014
69 Contact:        Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
70 Description:
71                 The comp_algorithm file is read-write and lets to show
72                 available and selected compression algorithms, change
73                 compression algorithm selection.
74
75 What:           /sys/block/zram<id>/notify_free
76 Date:           August 2010
77 Contact:        Nitin Gupta <ngupta@vflare.org>
78 Description:
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
85 What:           /sys/block/zram<id>/discard
86 Date:           August 2010
87 Contact:        Nitin Gupta <ngupta@vflare.org>
88 Description:
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
94 What:           /sys/block/zram<id>/zero_pages
95 Date:           August 2010
96 Contact:        Nitin Gupta <ngupta@vflare.org>
97 Description:
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
102 What:           /sys/block/zram<id>/orig_data_size
103 Date:           August 2010
104 Contact:        Nitin Gupta <ngupta@vflare.org>
105 Description:
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
111 What:           /sys/block/zram<id>/compr_data_size
112 Date:           August 2010
113 Contact:        Nitin Gupta <ngupta@vflare.org>
114 Description:
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
120 What:           /sys/block/zram<id>/mem_used_total
121 Date:           August 2010
122 Contact:        Nitin Gupta <ngupta@vflare.org>
123 Description:
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.
129                 Unit: bytes
130
131 What:           /sys/block/zram<id>/mem_limit
132 Date:           August 2014
133 Contact:        Minchan Kim <minchan@kernel.org>
134 Description:
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