xref: /linux/Documentation/ABI/testing/sysfs-block-zram (revision 8dd1d3247e6c00b50ef83934ea8b22a1590015de)
1e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/disksize
2e98419c2SNitin GuptaDate:		August 2010
3e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
4e98419c2SNitin GuptaDescription:
5e98419c2SNitin Gupta		The disksize file is read-write and specifies the disk size
6e98419c2SNitin Gupta		which represents the limit on the *uncompressed* worth of data
7e98419c2SNitin Gupta		that can be stored in this disk.
851d8a7b0SBernhard M. Wiedemann		Unit: bytes
9e98419c2SNitin Gupta
10e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/initstate
11e98419c2SNitin GuptaDate:		August 2010
12e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
13e98419c2SNitin GuptaDescription:
1451d8a7b0SBernhard M. Wiedemann		The initstate file is read-only and shows the initialization
15e98419c2SNitin Gupta		state of the device.
16e98419c2SNitin Gupta
17e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/reset
18e98419c2SNitin GuptaDate:		August 2010
19e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
20e98419c2SNitin GuptaDescription:
2151d8a7b0SBernhard M. Wiedemann		The reset file is write-only and allows resetting the
2251d8a7b0SBernhard M. Wiedemann		device. The reset operation frees all the memory associated
23e98419c2SNitin Gupta		with this device.
24e98419c2SNitin Gupta
25e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/num_reads
26e98419c2SNitin GuptaDate:		August 2010
27e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
28e98419c2SNitin GuptaDescription:
29e98419c2SNitin Gupta		The num_reads file is read-only and specifies the number of
30e98419c2SNitin Gupta		reads (failed or successful) done on this device.
31e98419c2SNitin Gupta
32e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/num_writes
33e98419c2SNitin GuptaDate:		August 2010
34e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
35e98419c2SNitin GuptaDescription:
36e98419c2SNitin Gupta		The num_writes file is read-only and specifies the number of
37e98419c2SNitin Gupta		writes (failed or successful) done on this device.
38e98419c2SNitin Gupta
39e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/invalid_io
40e98419c2SNitin GuptaDate:		August 2010
41e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
42e98419c2SNitin GuptaDescription:
43e98419c2SNitin Gupta		The invalid_io file is read-only and specifies the number of
44e98419c2SNitin Gupta		non-page-size-aligned I/O requests issued to this device.
45e98419c2SNitin Gupta
46*8dd1d324SSergey SenozhatskyWhat:		/sys/block/zram<id>/failed_reads
47*8dd1d324SSergey SenozhatskyDate:		February 2014
48*8dd1d324SSergey SenozhatskyContact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
49*8dd1d324SSergey SenozhatskyDescription:
50*8dd1d324SSergey Senozhatsky		The failed_reads file is read-only and specifies the number of
51*8dd1d324SSergey Senozhatsky		failed reads happened on this device.
52*8dd1d324SSergey Senozhatsky
53*8dd1d324SSergey Senozhatsky
54*8dd1d324SSergey SenozhatskyWhat:		/sys/block/zram<id>/failed_writes
55*8dd1d324SSergey SenozhatskyDate:		February 2014
56*8dd1d324SSergey SenozhatskyContact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
57*8dd1d324SSergey SenozhatskyDescription:
58*8dd1d324SSergey Senozhatsky		The failed_writes file is read-only and specifies the number of
59*8dd1d324SSergey Senozhatsky		failed writes happened on this device.
60*8dd1d324SSergey Senozhatsky
61e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/notify_free
62e98419c2SNitin GuptaDate:		August 2010
63e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
64e98419c2SNitin GuptaDescription:
65e98419c2SNitin Gupta		The notify_free file is read-only and specifies the number of
66e98419c2SNitin Gupta		swap slot free notifications received by this device. These
6751d8a7b0SBernhard M. Wiedemann		notifications are sent to a swap block device when a swap slot
68e98419c2SNitin Gupta		is freed. This statistic is applicable only when this disk is
69e98419c2SNitin Gupta		being used as a swap disk.
70e98419c2SNitin Gupta
71e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/zero_pages
72e98419c2SNitin GuptaDate:		August 2010
73e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
74e98419c2SNitin GuptaDescription:
75e98419c2SNitin Gupta		The zero_pages file is read-only and specifies number of zero
76e98419c2SNitin Gupta		filled pages written to this disk. No memory is allocated for
77e98419c2SNitin Gupta		such pages.
78e98419c2SNitin Gupta
79e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/orig_data_size
80e98419c2SNitin GuptaDate:		August 2010
81e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
82e98419c2SNitin GuptaDescription:
83e98419c2SNitin Gupta		The orig_data_size file is read-only and specifies uncompressed
84e98419c2SNitin Gupta		size of data stored in this disk. This excludes zero-filled
85e98419c2SNitin Gupta		pages (zero_pages) since no memory is allocated for them.
86e98419c2SNitin Gupta		Unit: bytes
87e98419c2SNitin Gupta
88e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/compr_data_size
89e98419c2SNitin GuptaDate:		August 2010
90e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
91e98419c2SNitin GuptaDescription:
92e98419c2SNitin Gupta		The compr_data_size file is read-only and specifies compressed
93e98419c2SNitin Gupta		size of data stored in this disk. So, compression ratio can be
94e98419c2SNitin Gupta		calculated using orig_data_size and this statistic.
95e98419c2SNitin Gupta		Unit: bytes
96e98419c2SNitin Gupta
97e98419c2SNitin GuptaWhat:		/sys/block/zram<id>/mem_used_total
98e98419c2SNitin GuptaDate:		August 2010
99e98419c2SNitin GuptaContact:	Nitin Gupta <ngupta@vflare.org>
100e98419c2SNitin GuptaDescription:
101e98419c2SNitin Gupta		The mem_used_total file is read-only and specifies the amount
102e98419c2SNitin Gupta		of memory, including allocator fragmentation and metadata
103e98419c2SNitin Gupta		overhead, allocated for this disk. So, allocator space
104e98419c2SNitin Gupta		efficiency can be calculated using compr_data_size and this
105e98419c2SNitin Gupta		statistic.
106e98419c2SNitin Gupta		Unit: bytes
107