Hi! Trying to kill the keyboard, cheese@arrakis.htu.tuwien.ac.at produced:
Was ist eigentlich der Unterschied zwischen einer Old Style Swap Area und einer New Style Swap Area ?
man mkswap Linux knows about two styles of swap areas, old style and new style. The last 10 bytes of the first page of the swap area distinguishes them: old style has `SWAP_SPACE', new style has `SWAPSPACE2' as signature. In the old style, the rest of this first page was a bit map, with a 1 bit for each usable page of the swap area. Since the first page holds this bit map, the first bit is 0. Also, the last 10 bytes hold the signature. So, if the page size is S, an old style swap area can describe at most 8*(S-10)-1 pages used for swapping. With S=4096 (as on i386), the useful area is at most 133890048 bytes (almost 128 MB if you believe in 1 MB=2^20 bytes), and the rest is wasted. On an alpha and sparc64, with S=8192, the useful area is at most 535560992 bytes (almost 512 MB with the same proviso). The old setup wastes most of this bitmap page, because zero bits denote bad blocks or blocks past the end of the swap space, and a simple integer suffices to indicate the size of the swap space, while the bad blocks, if any, can simply be listed. Nobody wants to use a swap space with hundreds of bad blocks. (I would not even use a swap space with 1 bad block.) In the new style swap area this is precisely what is done. The maximum useful size of a swap area now depends on the architecture. It is roughly 2GB on i386, PPC, m68k, ARM, 1GB on sparc, 512MB on mips, 128GB on alpha and 3TB on sparc64. Note that before 2.1.117 the kernel allocated one byte for each page, while it now allocates two bytes, so that tak ing a swap area of 2 GB in use might require 2 MB of ker nel memory. Presently, Linux allows 8 swap areas. The areas in use can be seen in the file /proc/swaps (since 2.1.25). -Wolfgang --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com