Re: How can I setup a swap partition?

From: Andrew Valencia <vandys_at_nospam.org>
Date: Sun Nov 23 1997 - 14:17:07 PST

[dufrp@oricom.ca writes:]

>>No swapping occurs by default. You need to configure the swap daemon, and
>>explicitly point him at a swap partition.
>Nice, I think I really need to do this.
>Could someone give me the steps needed to make this?

First, you have to have a disk partition available. Let's say it has a
partition type of "Linux swap", 0x82, so it'd be known as wd0_swap0 under
the first IDE drive.

In your menu.lst file, you have to add loading of the /vsta/boot/swap. No
command line options. With this, swapping is possible, though inactive.

Once booted, you need to run /vsta/bin/swapd. The argument is either "-n",
which only steals clean text pages (i.e., it flushes things out of the page
cache), or a swap partition (in "disk/wd:wd0_swap0" format), or no arguments
(just starts the machinery, without adding a swap partition). From looking
at the code, command line parsing may have gone quietly broken for the case
of passing in the swap partition name. I suggest that life will be more
than interesting enough with just clean text page stealing.

Consider building a kernel with the code under a WATCHMEM ifdef in
os/kern/vm_steal.c enabled. This'll give you a feel for whether the page
stealer is running and/or finding memory to steal.

The page stealing functions work OK, but the last time we hacked on this
code there were still clear signs that you could deadlock in the VM system.
There were scenarios where stealing pages was going to take some memory (to
support the needed exchange of microkernel messages) when none was
available. If your memory use doesn't plunge the freemem count down to 0
before more pages can be stolen, you'll probably be OK. VSTa and even MGR
are small enough that you don't need VM to do C development on even an 8 meg
system. Trying to run gcc 2.X (and maybe gdb, and MGR) will stress things
in brand new ways, so don't be too surprised if you're breaking new ground
(and debugging the fallout).

                                                        Andy
Received on Sun Nov 23 12:16:04 1997

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:43 PDT