xref: /openbmc/linux/drivers/block/zram/Kconfig (revision adb57164)
1# SPDX-License-Identifier: GPL-2.0
2config ZRAM
3	tristate "Compressed RAM block device support"
4	depends on BLOCK && SYSFS && ZSMALLOC && CRYPTO
5	select CRYPTO_LZO
6	help
7	  Creates virtual block devices called /dev/zramX (X = 0, 1, ...).
8	  Pages written to these disks are compressed and stored in memory
9	  itself. These disks allow very fast I/O and compression provides
10	  good amounts of memory savings.
11
12	  It has several use cases, for example: /tmp storage, use as swap
13	  disks and maybe many more.
14
15	  See Documentation/admin-guide/blockdev/zram.rst for more information.
16
17config ZRAM_WRITEBACK
18       bool "Write back incompressible or idle page to backing device"
19       depends on ZRAM
20       help
21	 With incompressible page, there is no memory saving to keep it
22	 in memory. Instead, write it out to backing device.
23	 For this feature, admin should set up backing device via
24	 /sys/block/zramX/backing_dev.
25
26	 With /sys/block/zramX/{idle,writeback}, application could ask
27	 idle page's writeback to the backing device to save in memory.
28
29	 See Documentation/admin-guide/blockdev/zram.rst for more information.
30
31config ZRAM_MEMORY_TRACKING
32	bool "Track zRam block status"
33	depends on ZRAM && DEBUG_FS
34	help
35	  With this feature, admin can track the state of allocated blocks
36	  of zRAM. Admin could see the information via
37	  /sys/kernel/debug/zram/zramX/block_state.
38
39	  See Documentation/admin-guide/blockdev/zram.rst for more information.
40