Re: Linux's Virtual Memory implementation

Wayne Schlitt (wayne@midwestcs.com)
04 Apr 1999 18:41:47 -0500


In <Pine.LNX.4.05.9904030623040.2970-100000@mhw.ULib.IUPUI.Edu> "Mark H. Wood" <mwood@IUPUI.Edu> writes:

> Indeed, there's no reason to ever write pure code pages into swap space
> since you can just page them from the original image.

Actually, there are reasons to write pure code pages to swap.

First, the swap device may well be much faster than other disks. The
traditional UNIX setup was to have a small, but fast disk for swap,
and the root filesystem. Then, you would have a much slower disk for
/usr. This is why there is both a /tmp and a /usr/tmp. The former is
for small, but fast temporary files, the latter is what you use if
your temp files were too big.

Secondly, it can often be much faster to locate a code block that is
swap than it is to locate it in the filesystem.

The "sticky bit" on executables (chmod +t) was originally designed to
mark the executable to be "always in swap", even if it wasn't
currently being run. Made for faster startup times on key programs.

-wayne

-- 
Wayne Schlitt can not assert the truth of all statements in this
article and still be consistent.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/