I was able to narrow it down a little, and the following patch "fixes" the
problem. It simply turns off asynchronous swapping. I hope someone will be
able to fix this bug in a more efficient way.
diff -urd linux-1.3.85/mm/vmscan.c linux/mm/vmscan.c
--- linux-1.3.85/mm/vmscan.c Sat Apr 6 10:41:15 1996
+++ linux/mm/vmscan.c Wed Apr 10 00:00:05 1996
@@ -402,7 +402,7 @@
swapstats.wakeups++;
/* Do the background pageout: */
for (i=0; i < kswapd_ctl.maxpages; i++)
- try_to_free_page(GFP_KERNEL, 0, 0);
+ try_to_free_page(GFP_KERNEL, 0, 1);
}
}