Fabian Frederick 0ad46becb5 selftests/zram: replace ZRAM_LZ4_COMPRESS 9 gadi atpakaļ
..
Makefile 7eba7d90d4 selftests/zram: Makefile fix 10 gadi atpakaļ
README 0ad46becb5 selftests/zram: replace ZRAM_LZ4_COMPRESS 9 gadi atpakaļ
config 8c749ce93e selftests: create test-specific kconfig fragments 9 gadi atpakaļ
zram.sh 7ef7cc9fdf seltests/zram: fix syntax error 10 gadi atpakaļ
zram01.sh 2dfb28e341 selftests/zram: must be run as root 10 gadi atpakaļ
zram02.sh 2dfb28e341 selftests/zram: must be run as root 10 gadi atpakaļ
zram_lib.sh 7ef7cc9fdf seltests/zram: fix syntax error 10 gadi atpakaļ

README

zram: Compressed RAM based block devices
----------------------------------------
* Introduction

The zram module creates RAM based block devices named /dev/zram
( = 0, 1, ...). Pages written to these disks are compressed and stored
in memory itself. These disks allow very fast I/O and compression provides
good amounts of memory savings. Some of the usecases include /tmp storage,
use as swap disks, various caches under /var and maybe many more :)

Statistics for individual zram devices are exported through sysfs nodes at
/sys/block/zram/

Kconfig required:
CONFIG_ZRAM=y
CONFIG_CRYPTO_LZ4=y
CONFIG_ZPOOL=y
CONFIG_ZSMALLOC=y

ZRAM Testcases
--------------
zram_lib.sh: create library with initialization/cleanup functions
zram.sh: For sanity check of CONFIG_ZRAM and to run zram01 and zram02

Two functional tests: zram01 and zram02:
zram01.sh: creates general purpose ram disks with ext4 filesystems
zram02.sh: creates block device for swap

Commands required for testing:
- bc
- dd
- free
- awk
- mkswap
- swapon
- swapoff
- mkfs/ mkfs.ext4

For more information please refer:
kernel-source-tree/Documentation/blockdev/zram.txt