Linux Audio

Check our new training course

Loading...
v6.2
  1What:		/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		Unit: bytes
  9
 10What:		/sys/block/zram<id>/initstate
 11Date:		August 2010
 12Contact:	Nitin Gupta <ngupta@vflare.org>
 13Description:
 14		The initstate file is read-only and shows the initialization
 15		state of the device.
 16
 17What:		/sys/block/zram<id>/reset
 18Date:		August 2010
 19Contact:	Nitin Gupta <ngupta@vflare.org>
 20Description:
 21		The reset file is write-only and allows resetting the
 22		device. The reset operation frees all the memory associated
 23		with this device.
 24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 25What:		/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
 33What:		/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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 41What:		/sys/block/zram<id>/mem_used_max
 42Date:		August 2014
 43Contact:	Minchan Kim <minchan@kernel.org>
 44Description:
 45		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.
 49		Unit: bytes
 50
 51What:		/sys/block/zram<id>/mem_limit
 52Date:		August 2014
 53Contact:	Minchan Kim <minchan@kernel.org>
 54Description:
 55		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
 59
 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.
 67
 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.
 76
 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.
 84
 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.
 93
 94What:		/sys/block/zram<id>/backing_dev
 95Date:		June 2017
 96Contact:	Minchan Kim <minchan@kernel.org>
 97Description:
 98		The backing_dev file is read-write and set up backing
 99		device for zram to write incompressible pages.
100		For using, user should enable CONFIG_ZRAM_WRITEBACK.
101
102What:		/sys/block/zram<id>/idle
103Date:		November 2018
104Contact:	Minchan Kim <minchan@kernel.org>
105Description:
106		idle file is write-only and mark zram slot as idle.
107		If system has mounted debugfs, user can see which slots
108		are idle via /sys/kernel/debug/zram/zram<id>/block_state
109
110What:		/sys/block/zram<id>/writeback
111Date:		November 2018
112Contact:	Minchan Kim <minchan@kernel.org>
113Description:
114		The writeback file is write-only and trigger idle and/or
115		huge page writeback to backing device.
116
117What:		/sys/block/zram<id>/bd_stat
118Date:		November 2018
119Contact:	Minchan Kim <minchan@kernel.org>
120Description:
121		The bd_stat file is read-only and represents backing device's
122		statistics (bd_count, bd_reads, bd_writes) in a format
123		similar to block layer statistics file format.
124
125What:		/sys/block/zram<id>/writeback_limit_enable
126Date:		November 2018
127Contact:	Minchan Kim <minchan@kernel.org>
128Description:
129		The writeback_limit_enable file is read-write and specifies
130		eanbe of writeback_limit feature. "1" means eable the feature.
131		No limit "0" is the initial state.
132
133What:		/sys/block/zram<id>/writeback_limit
134Date:		November 2018
135Contact:	Minchan Kim <minchan@kernel.org>
136Description:
137		The writeback_limit file is read-write and specifies the maximum
138		amount of writeback ZRAM can do. The limit could be changed
139		in run time.
140
141What:		/sys/block/zram<id>/recomp_algorithm
142Date:		November 2022
143Contact:	Sergey Senozhatsky <senozhatsky@chromium.org>
144Description:
145		The recomp_algorithm file is read-write and allows to set
146		or show secondary compression algorithms.
147
148What:		/sys/block/zram<id>/recompress
149Date:		November 2022
150Contact:	Sergey Senozhatsky <senozhatsky@chromium.org>
151Description:
152		The recompress file is write-only and triggers re-compression
153		with secondary compression algorithms.
v4.6
  1What:		/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		Unit: bytes
  9
 10What:		/sys/block/zram<id>/initstate
 11Date:		August 2010
 12Contact:	Nitin Gupta <ngupta@vflare.org>
 13Description:
 14		The initstate file is read-only and shows the initialization
 15		state of the device.
 16
 17What:		/sys/block/zram<id>/reset
 18Date:		August 2010
 19Contact:	Nitin Gupta <ngupta@vflare.org>
 20Description:
 21		The reset file is write-only and allows resetting the
 22		device. The reset operation frees all the memory associated
 23		with this device.
 24
 25What:		/sys/block/zram<id>/num_reads
 26Date:		August 2010
 27Contact:	Nitin Gupta <ngupta@vflare.org>
 28Description:
 29		The num_reads file is read-only and specifies the number of
 30		reads (failed or successful) done on this device.
 31
 32What:		/sys/block/zram<id>/num_writes
 33Date:		August 2010
 34Contact:	Nitin Gupta <ngupta@vflare.org>
 35Description:
 36		The num_writes file is read-only and specifies the number of
 37		writes (failed or successful) done on this device.
 38
 39What:		/sys/block/zram<id>/invalid_io
 40Date:		August 2010
 41Contact:	Nitin Gupta <ngupta@vflare.org>
 42Description:
 43		The invalid_io file is read-only and specifies the number of
 44		non-page-size-aligned I/O requests issued to this device.
 45
 46What:		/sys/block/zram<id>/failed_reads
 47Date:		February 2014
 48Contact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
 49Description:
 50		The failed_reads file is read-only and specifies the number of
 51		failed reads happened on this device.
 52
 53What:		/sys/block/zram<id>/failed_writes
 54Date:		February 2014
 55Contact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
 56Description:
 57		The failed_writes file is read-only and specifies the number of
 58		failed writes happened on this device.
 59
 60What:		/sys/block/zram<id>/max_comp_streams
 61Date:		February 2014
 62Contact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
 63Description:
 64		The max_comp_streams file is read-write and specifies the
 65		number of backend's zcomp_strm compression streams (number of
 66		concurrent compress operations).
 67
 68What:		/sys/block/zram<id>/comp_algorithm
 69Date:		February 2014
 70Contact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
 71Description:
 72		The comp_algorithm file is read-write and lets to show
 73		available and selected compression algorithms, change
 74		compression algorithm selection.
 75
 76What:		/sys/block/zram<id>/notify_free
 77Date:		August 2010
 78Contact:	Nitin Gupta <ngupta@vflare.org>
 79Description:
 80		The notify_free file is read-only. Depending on device usage
 81		scenario it may account a) the number of pages freed because
 82		of swap slot free notifications or b) the number of pages freed
 83		because of REQ_DISCARD requests sent by bio. The former ones
 84		are sent to a swap block device when a swap slot is freed, which
 85		implies that this disk is being used as a swap disk. The latter
 86		ones are sent by filesystem mounted with discard option,
 87		whenever some data blocks are getting discarded.
 88
 89What:		/sys/block/zram<id>/zero_pages
 90Date:		August 2010
 91Contact:	Nitin Gupta <ngupta@vflare.org>
 92Description:
 93		The zero_pages file is read-only and specifies number of zero
 94		filled pages written to this disk. No memory is allocated for
 95		such pages.
 96
 97What:		/sys/block/zram<id>/orig_data_size
 98Date:		August 2010
 99Contact:	Nitin Gupta <ngupta@vflare.org>
100Description:
101		The orig_data_size file is read-only and specifies uncompressed
102		size of data stored in this disk. This excludes zero-filled
103		pages (zero_pages) since no memory is allocated for them.
104		Unit: bytes
105
106What:		/sys/block/zram<id>/compr_data_size
107Date:		August 2010
108Contact:	Nitin Gupta <ngupta@vflare.org>
109Description:
110		The compr_data_size file is read-only and specifies compressed
111		size of data stored in this disk. So, compression ratio can be
112		calculated using orig_data_size and this statistic.
113		Unit: bytes
114
115What:		/sys/block/zram<id>/mem_used_total
116Date:		August 2010
117Contact:	Nitin Gupta <ngupta@vflare.org>
118Description:
119		The mem_used_total file is read-only and specifies the amount
120		of memory, including allocator fragmentation and metadata
121		overhead, allocated for this disk. So, allocator space
122		efficiency can be calculated using compr_data_size and this
123		statistic.
124		Unit: bytes
125
126What:		/sys/block/zram<id>/mem_used_max
127Date:		August 2014
128Contact:	Minchan Kim <minchan@kernel.org>
129Description:
130		The mem_used_max file is read/write and specifies the amount
131		of maximum memory zram have consumed to store compressed data.
132		For resetting the value, you should write "0". Otherwise,
133		you could see -EINVAL.
134		Unit: bytes
135
136What:		/sys/block/zram<id>/mem_limit
137Date:		August 2014
138Contact:	Minchan Kim <minchan@kernel.org>
139Description:
140		The mem_limit file is read/write and specifies the maximum
141		amount of memory ZRAM can use to store the compressed data.  The
142		limit could be changed in run time and "0" means disable the
143		limit.  No limit is the initial state.  Unit: bytes
144
145What:		/sys/block/zram<id>/compact
146Date:		August 2015
147Contact:	Minchan Kim <minchan@kernel.org>
148Description:
149		The compact file is write-only and trigger compaction for
150		allocator zrm uses. The allocator moves some objects so that
151		it could free fragment space.
152
153What:		/sys/block/zram<id>/io_stat
154Date:		August 2015
155Contact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
156Description:
157		The io_stat file is read-only and accumulates device's I/O
158		statistics not accounted by block layer. For example,
159		failed_reads, failed_writes, etc. File format is similar to
160		block layer statistics file format.
161
162What:		/sys/block/zram<id>/mm_stat
163Date:		August 2015
164Contact:	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
165Description:
166		The mm_stat file is read-only and represents device's mm
167		statistics (orig_data_size, compr_data_size, etc.) in a format
168		similar to block layer statistics file format.