18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ciconfig ZRAM
38c2ecf20Sopenharmony_ci	tristate "Compressed RAM block device support"
48c2ecf20Sopenharmony_ci	depends on BLOCK && SYSFS && ZSMALLOC && CRYPTO
58c2ecf20Sopenharmony_ci	select CRYPTO_LZO
68c2ecf20Sopenharmony_ci	help
78c2ecf20Sopenharmony_ci	  Creates virtual block devices called /dev/zramX (X = 0, 1, ...).
88c2ecf20Sopenharmony_ci	  Pages written to these disks are compressed and stored in memory
98c2ecf20Sopenharmony_ci	  itself. These disks allow very fast I/O and compression provides
108c2ecf20Sopenharmony_ci	  good amounts of memory savings.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci	  It has several use cases, for example: /tmp storage, use as swap
138c2ecf20Sopenharmony_ci	  disks and maybe many more.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci	  See Documentation/admin-guide/blockdev/zram.rst for more information.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciconfig ZRAM_WRITEBACK
188c2ecf20Sopenharmony_ci       bool "Write back incompressible or idle page to backing device"
198c2ecf20Sopenharmony_ci       depends on ZRAM
208c2ecf20Sopenharmony_ci       help
218c2ecf20Sopenharmony_ci	 With incompressible page, there is no memory saving to keep it
228c2ecf20Sopenharmony_ci	 in memory. Instead, write it out to backing device.
238c2ecf20Sopenharmony_ci	 For this feature, admin should set up backing device via
248c2ecf20Sopenharmony_ci	 /sys/block/zramX/backing_dev.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci	 With /sys/block/zramX/{idle,writeback}, application could ask
278c2ecf20Sopenharmony_ci	 idle page's writeback to the backing device to save in memory.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci	 See Documentation/admin-guide/blockdev/zram.rst for more information.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciconfig ZRAM_MEMORY_TRACKING
328c2ecf20Sopenharmony_ci	bool "Track zRam block status"
338c2ecf20Sopenharmony_ci	depends on ZRAM && DEBUG_FS
348c2ecf20Sopenharmony_ci	help
358c2ecf20Sopenharmony_ci	  With this feature, admin can track the state of allocated blocks
368c2ecf20Sopenharmony_ci	  of zRAM. Admin could see the information via
378c2ecf20Sopenharmony_ci	  /sys/kernel/debug/zram/zramX/block_state.
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci	  See Documentation/admin-guide/blockdev/zram.rst for more information.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_cisource "drivers/block/zram/zram_group/Kconfig"
42