From 33863c21e69e9bd988b63580ada0b729c1d90215 Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Mon, 9 Aug 2010 22:56:47 +0530 Subject: Staging: zram: Replace ioctls with sysfs interface Creates per-device sysfs nodes in /sys/block/zram/ 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 Acked-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/zram/Kconfig | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/staging/zram/Kconfig') diff --git a/drivers/staging/zram/Kconfig b/drivers/staging/zram/Kconfig index 4654ae2..da079f8 100644 --- a/drivers/staging/zram/Kconfig +++ b/drivers/staging/zram/Kconfig @@ -15,15 +15,3 @@ config ZRAM See zram.txt for more information. Project home: http://compcache.googlecode.com/ - -config ZRAM_STATS - bool "Enable statistics for compressed RAM disks" - depends on ZRAM - default y - help - Enable statistics collection for compressed RAM devices. Statistics - are exported through ioctl interface, so you have to use zramconfig - program to get them. This adds only a minimal overhead. - - If unsure, say Y. - -- cgit v1.1