Staging: zram: Rename ramzswap to zram in documentation

Related changes:
 - Included example to show usage as generic
(non-swap) disk with ext4 filesystem.
 - Renamed rzscontrol to zramconfig to match
with new device naming.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Nitin Gupta 2010-06-01 13:31:26 +05:30 committed by Greg Kroah-Hartman
parent f1e3cfff4d
commit 00ac9ba01d

View file

@ -1,46 +1,57 @@
ramzswap: Compressed RAM based swap device zram: Compressed RAM based block devices
------------------------------------------- ----------------------------------------
Project home: http://compcache.googlecode.com/ Project home: http://compcache.googlecode.com/
* Introduction * Introduction
The ramzswap module creates RAM based block devices which can (only) be used as The zram module creates RAM based block devices: /dev/ramX (X = 0, 1, ...).
swap disks. Pages swapped to these devices are compressed and stored in memory Pages written to these disks are compressed and stored in memory itself.
itself. See project home for use cases, performance numbers and a lot more. These disks allow very fast I/O and compression provides good amounts of
memory savings.
Individual ramzswap devices are configured and initialized using rzscontrol See project home for use cases, performance numbers and a lot more.
userspace utility as shown in examples below. See rzscontrol man page for more
details. Individual zram devices are configured and initialized using zramconfig
userspace utility as shown in examples below. See zramconfig man page for
more details.
* Usage * Usage
Following shows a typical sequence of steps for using ramzswap. Following shows a typical sequence of steps for using zram.
1) Load Modules: 1) Load Modules:
modprobe ramzswap num_devices=4 modprobe zram num_devices=4
This creates 4 (uninitialized) devices: /dev/ramzswap{0,1,2,3} This creates 4 (uninitialized) devices: /dev/zram{0,1,2,3}
(num_devices parameter is optional. Default: 1) (num_devices parameter is optional. Default: 1)
2) Initialize: 2) Initialize:
Use rzscontrol utility to configure and initialize individual Use zramconfig utility to configure and initialize individual
ramzswap devices. Example: zram devices. For example:
rzscontrol /dev/ramzswap2 --init # uses default value of disksize_kb zramconfig /dev/zram0 --init # uses default value of disksize_kb
zramconfig /dev/zram1 --disksize_kb=102400 # 100MB /dev/zram1
*See rzscontrol man page for more details and examples* *See zramconfig man page for more details and examples*
3) Activate: 3) Activate:
swapon /dev/ramzswap2 # or any other initialized ramzswap device mkswap /dev/zram0
swapon /dev/zram0
mkfs.ext4 /dev/zram1
mount /dev/zram1 /tmp
4) Stats: 4) Stats:
rzscontrol /dev/ramzswap2 --stats zramconfig /dev/zram0 --stats
zramconfig /dev/zram1 --stats
5) Deactivate: 5) Deactivate:
swapoff /dev/ramzswap2 swapoff /dev/zram0
umount /dev/zram1
6) Reset: 6) Reset:
rzscontrol /dev/ramzswap2 --reset zramconfig /dev/zram0 --reset
(This frees all the memory allocated for this device). zramconfig /dev/zram1 --reset
(This frees memory allocated for the given device).
Please report any problems at: Please report any problems at: