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