linux/drivers/staging/zram
Nitin Gupta 33863c21e6 Staging: zram: Replace ioctls with sysfs interface
Creates per-device sysfs nodes in /sys/block/zram<id>/
Currently following stats are exported:
 - disksize
 - num_reads
 - num_writes
 - invalid_io
 - zero_pages
 - orig_data_size
 - compr_data_size
 - mem_used_total

By default, disksize is set to 0. So, to start using
a zram device, fist write a disksize value and then
initialize device by writing any positive value to
initstate. For example:

        # initialize /dev/zram0 with 50MB disksize
        echo 50*1024*1024 | bc > /sys/block/zram0/disksize
        echo 1 > /sys/block/zram0/initstate

When done using a disk, issue reset to free its memory
by writing any positive value to reset node:

        echo 1 > /sys/block/zram0/reset

This change also obviates the need for 'rzscontrol' utility.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 15:33:54 -07:00
..
Kconfig Staging: zram: Replace ioctls with sysfs interface 2010-08-31 15:33:54 -07:00
Makefile Staging: zram: Replace ioctls with sysfs interface 2010-08-31 15:33:54 -07:00
xvmalloc_int.h Staging: Rename ramzswap files to zram 2010-06-18 12:46:42 -07:00
xvmalloc.c Staging: Rename ramzswap files to zram 2010-06-18 12:46:42 -07:00
xvmalloc.h Staging: Rename ramzswap files to zram 2010-06-18 12:46:42 -07:00
zram_drv.c Staging: zram: Replace ioctls with sysfs interface 2010-08-31 15:33:54 -07:00
zram_drv.h Staging: zram: Replace ioctls with sysfs interface 2010-08-31 15:33:54 -07:00
zram_sysfs.c Staging: zram: Replace ioctls with sysfs interface 2010-08-31 15:33:54 -07:00
zram.txt Staging: zram: Rename ramzswap to zram in documentation 2010-06-18 12:50:30 -07:00