Skip to content

Commit

Permalink
Staging: virtual block device driver (ramzswap)
Browse files Browse the repository at this point in the history
Creates RAM based block devices (/dev/ramzswapX) which can be
used (only) as swap disks. Pages swapped to these are compressed
and stored in memory itself.

The module is called ramzswap.ko. It depends on:
 - xvmalloc memory allocator (compiled with this driver)
 - lzo_compress.ko
 - lzo_decompress.ko

See ramzswap.txt for usage details.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Nitin Gupta authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 644bf7b commit 306b0c9
Show file tree
Hide file tree
Showing 7 changed files with 1,682 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ source "drivers/staging/sep/Kconfig"

source "drivers/staging/iio/Kconfig"

source "drivers/staging/ramzswap/Kconfig"

source "drivers/staging/strip/Kconfig"

source "drivers/staging/arlan/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ obj-$(CONFIG_VME_BUS) += vme/
obj-$(CONFIG_RAR_REGISTER) += rar/
obj-$(CONFIG_DX_SEP) += sep/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_RAMZSWAP) += ramzswap/
obj-$(CONFIG_STRIP) += strip/
obj-$(CONFIG_ARLAN) += arlan/
obj-$(CONFIG_WAVELAN) += wavelan/
Expand Down
21 changes: 21 additions & 0 deletions drivers/staging/ramzswap/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
config RAMZSWAP
tristate "Compressed in-memory swap device (ramzswap)"
depends on SWAP
select LZO_COMPRESS
select LZO_DECOMPRESS
default n
help
Creates virtual block devices which can be used (only) as a swap
disks. Pages swapped to these disks are compressed and stored in
memory itself.

See ramzswap.txt for more information.
Project home: http://compcache.googlecode.com/

config RAMZSWAP_STATS
bool "Enable ramzswap stats"
depends on RAMZSWAP
default y
help
Enable statistics collection for ramzswap. This adds only a minimal
overhead. In unsure, say Y.
3 changes: 3 additions & 0 deletions drivers/staging/ramzswap/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ramzswap-objs := ramzswap_drv.o xvmalloc.o

obj-$(CONFIG_RAMZSWAP) += ramzswap.o
Loading

0 comments on commit 306b0c9

Please sign in to comment.