From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,3f9fa23da089bee3,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1995-01-01 06:21:42 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!pipex!sunic!news.funet.fi!news.csc.fi!news.helsinki.fi!not-for-mail From: David.H.West@um.cc.umich.edu Newsgroups: comp.os.linux.announce Subject: patch to swap to slower memory (e.g. expansion board) Followup-To: comp.os.linux.development.system Date: 1 Jan 1995 16:14:01 +0200 Organization: ? Sender: wirzeniu@cc.Helsinki.FI Message-ID: <3e6db9$4aq@kruuna.Helsinki.FI> NNTP-Posting-Host: kruuna.helsinki.fi Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Keywords: Linux, kernel, ramdisk, swapping, memory I've uploaded ramdiskswap.tar.gz and ramdiskswap.lsm to sunsite.unc.edu:pub/Linux/Incoming. 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. David West David_H_West@um.cc.umich.edu - - - - - end of ramdiskswap.README - - - - - -- Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember Keywords: and a short description of the software.