]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/swap
Import sources from 2011-03-30 iso image - sys/man
[plan9front.git] / sys / man / 8 / swap
1 .TH SWAP 8
2 .SH NAME
3 swap \- establish a swap file
4 .SH SYNOPSIS
5 .B swap
6 .I file 
7 .SH DESCRIPTION
8 .I Swap
9 establishes a file or device for the system to swap on.
10 If
11 .I file
12 is a device, the device is used directly; if a directory,
13 a unique file is created in that directory on which to swap.
14 The environment variable
15 .B swap
16 is set to the full name of the resulting file.
17 The number of blocks available in the file or device
18 must be at least the number of swap blocks configured
19 at system boot time.
20 .PP
21 If a swap channel has already been set and no blocks
22 are currently valid in the file the old file will be
23 closed and then replaced. If any blocks are valid on
24 the device an error is returned instead.
25 .SH SOURCE
26 .B /sys/src/cmd/swap.c
27 .SH BUGS
28 Swapping to a file served by a local user-level process, such as
29 .IR kfs (4),
30 can lead to deadlock; use raw devices or remote files instead.