Date: | 2010-05-26 07:24:21 (13 years 10 months ago) |
---|---|
Author: | Nitin Gupta |
Commit: | 8b74237fa21aee6caf700e5a23c89d67c999804e |
Message: | 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> |
Files: |
drivers/staging/zram/zram.txt (1 diff) |
Change Details
drivers/staging/zram/zram.txt | ||
---|---|---|
1 | ramzswap: Compressed RAM based swap device | |
1 | zram: Compressed RAM based block devices | |
2 | ---------------------------------------- | |
2 | 3 | |
3 | 4 | Project home: http://compcache.googlecode.com/ |
4 | 5 | |
5 | 6 | * Introduction |
6 | 7 | |
7 | The ramzswap module creates RAM based block devices which can (only) be used as | |
8 | swap disks. Pages swapped to these devices are compressed and stored in memory | |
9 | itself. See project home for use cases, performance numbers and a lot more. | |
8 | The zram module creates RAM based block devices: /dev/ramX (X = 0, 1, ...). | |
9 | Pages written to these disks are compressed and stored in memory itself. | |
10 | These disks allow very fast I/O and compression provides good amounts of | |
11 | memory savings. | |
10 | 12 | |
11 | Individual ramzswap devices are configured and initialized using rzscontrol | |
12 | userspace utility as shown in examples below. See rzscontrol man page for more | |
13 | details. | |
13 | See project home for use cases, performance numbers and a lot more. | |
14 | ||
15 | Individual zram devices are configured and initialized using zramconfig | |
16 | userspace utility as shown in examples below. See zramconfig man page for | |
17 | more details. | |
14 | 18 | |
15 | 19 | * Usage |
16 | 20 | |
17 | Following shows a typical sequence of steps for using ramzswap. | |
21 | Following shows a typical sequence of steps for using zram. | |
18 | 22 | |
19 | 23 | 1) Load Modules: |
20 | modprobe ramzswap num_devices=4 | |
21 | This creates 4 (uninitialized) devices: /dev/ramzswap{0,1,2,3} | |
24 | modprobe zram num_devices=4 | |
25 | This creates 4 (uninitialized) devices: /dev/zram{0,1,2,3} | |
22 | 26 | (num_devices parameter is optional. Default: 1) |
23 | 27 | |
24 | 28 | 2) Initialize: |
25 | Use rzscontrol utility to configure and initialize individual | |
26 | ramzswap devices. Example: | |
27 | rzscontrol /dev/ramzswap2 --init # uses default value of disksize_kb | |
29 | Use zramconfig utility to configure and initialize individual | |
30 | zram devices. For example: | |
31 | zramconfig /dev/zram0 --init # uses default value of disksize_kb | |
32 | zramconfig /dev/zram1 --disksize_kb=102400 # 100MB /dev/zram1 | |
28 | 33 | |
29 | *See rzscontrol man page for more details and examples* | |
34 | *See zramconfig man page for more details and examples* | |
30 | 35 | |
31 | 36 | 3) Activate: |
32 | swapon /dev/ramzswap2 # or any other initialized ramzswap device | |
37 | mkswap /dev/zram0 | |
38 | swapon /dev/zram0 | |
39 | ||
40 | mkfs.ext4 /dev/zram1 | |
41 | mount /dev/zram1 /tmp | |
33 | 42 | |
34 | 43 | 4) Stats: |
35 | rzscontrol /dev/ramzswap2 --stats | |
44 | zramconfig /dev/zram0 --stats | |
45 | zramconfig /dev/zram1 --stats | |
36 | 46 | |
37 | 47 | 5) Deactivate: |
38 | swapoff /dev/ramzswap2 | |
48 | swapoff /dev/zram0 | |
49 | umount /dev/zram1 | |
39 | 50 | |
40 | 51 | 6) Reset: |
41 | rzscontrol /dev/ramzswap2 --reset | |
42 | (This frees all the memory allocated for this device). | |
52 | zramconfig /dev/zram0 --reset | |
53 | zramconfig /dev/zram1 --reset | |
54 | (This frees memory allocated for the given device). | |
43 | 55 | |
44 | 56 | |
45 | 57 | Please report any problems at: |
Branches:
ben-wpan
ben-wpan-stefan
5396a9238205f20f811ea57898980d3ca82df0b6
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9