patch to swap to slower memory (e.g. expansion board)

patch to swap to slower memory (e.g. expansion board)

Post by David.H.W.. » Mon, 02 Jan 1995 23:14:01

I've uploaded ramdiskswap.tar.gz and ramdiskswap.lsm to  This will likely speed up your system
if it has both fast memory (on the motherboard) and slow memory (typically
on an expansion board).  Here's the README:

 - - - - - - ramdiskswap.README - - - - -

This tiny patch makes it possible to use the memory on expansion boards
as swap rather than as primary memory.  On my system (a 16MHz 386SX with
4M on the motherboard and 4M on an ISA expansion card), this makes CPU-bound
tasks faster by a factor of almost 2 (measured) when lightly loaded, which
I expect to decrease to a factor of almost 4/3 when heavily loaded.

The patch moves the ramdisk to the top of memory, which is where expansion
board memory usually appears.  The example /etc/rc.d/rc.S file shows how
the (first) swapspace can be automatically initialized to be on the ramdisk
and of the correct size.  Before booting, you must have set the size of the
ramdisk by using rdev on the zImage, and insured that /dev/ram is properly
set up; mine looks like:

brw-rw----   1 root     disk       1,   1 Nov 30  1993 /dev/ram

The right size for the ramdisk is almost certainly the whole of the memory on
the expansion board.  Even though running "free" immediately after login shows
more than 0.5 MB of memory already in use, this will eventually be swapped out
if necessary, and one should therefore not reduce the size of the ramdisk by
this amount.  The patch should be applied in /usr/src/linux.

This patch is against kernel version 1.0.9.  Even though I've successfully
compiled a kernel under it, I still consider it ALPHA, because 1) no-one else
has used this particular patch (though several people seem to have done
something similar without making it widely available), and 2) it's my first
attempt at a kernel patch.  So I deny all responsibility for any havoc it may
wreak on your system.  Something like it may well work for later kernels, but
you're on your own.

NOTE: I use Bootlin, not LILO, so the patch itself hides the ramdisk memory
from the rest of the kernel, which has two consequences: 1) it doesn't show up
in the "available" or "data" figures in the boot messages (but you'll see it
in the "RAMDISK" message); and 2) if you use LILO, after applying this patch
you don't need to (and shouldn't) change any memory-size parameter passed to
LILO, because the patched kernel needs to start out knowing about all of core.

 - - - - - end of ramdiskswap.README - - - - -


PLEASE remember Keywords: and a short description of the software.


1. expansion memory board

I just plugged in an expansion memory board into my pc. How do I get Linux to
recognise it?

Thanks in advance.

 .oooooo..o                              | Kidambi Sreenivas
d8P'    `Y8                              | NSF Engineering Research Center
Y88bo.      oooo d8b  .ooooo.   .ooooo.  | for Computational Field Simulation

     `"Y88b  888     888ooo888 888ooo888 | (W)   : (601) 324-2470
oo     .d8P  888     888    .o 888    .o | (H)   : (601) 325-5422
8""88888P'  d888b    `Y8bod8P' `Y8bod8P' | FAX   : (601) 325-7692

2. solaris newbie PROM upgrade in ULTRA I ?

3. SUSE 6.3 als Router

4. Need help with 4mm DAT Archive Python

5. AT-Plus memory expansion board driver

6. Problem with callback client config

7. : Compaq DeskPro 486/33M, Memory expansion Board...

8. Boca Memory Expansion Ram Disk as Swap Device

9. E4500 disable CPU board, swap CPU board, while in production

10. Swap utilization (mirroring??) (ration of memory to swap?)

11. Serial port expansion board recommendation?