Bug (or Feature) in the swap system

From: Larry Finger
Date: Mon Sep 25 2006 - 21:35:36 EST


On my system, I used to have two smallish swap partitions on hda3 and hda7. When I upgraded my hard drive, I increased the size of hda7 and planned to mount hda3 as /boot. Accordingly, I formatted it as an ext3 partition, but failed to modify fstab.

When I first booted with the new drive, I noticed the error message that it was unable to find a swap space signature; therefore, I checked the swap space with the free command and was satisfied to see 1250 MB of swap space. Everything seemed fine when the system was first booted; however any sizable task such as a kernel build would proceed very slowly. From top, I learned that the cpu usage by the system was in the 85-90% range. It was impossible to move the mouse, or to do anything interactive. Process kswapd0 would run frequently, but no swap space was ever used. As hda3 had never been used, it was simple to change it to a swap partition, format it, and issue a swapon. IMMEDIATELY, the system was normal!

Getting back to my subject line: Is this an obscure bug or a feature designed to punish idiots that cannot set up their swap space correctly?

Thanks,

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