| Kernel v2.4.13-pre5 /mm/swap.c |
|---|
 2.4.13-pre5
 mm
 swap.c
diff -u --recursive --new-file v2.4.12/linux/mm/swap.c linux/mm/swap.c
--- v2.4.12/linux/mm/swap.c Sun Sep 23 11:41:01 2001
+++ linux/mm/swap.c Wed Oct 17 09:47:36 2001
@@ -130,11 +130,15 @@
*/
void __init swap_setup(void)
{
- /* Use a smaller cluster for memory <16MB or <32MB */
- if (num_physpages < ((16 * 1024 * 1024) >> PAGE_SHIFT))
+ unsigned long megs = num_physpages >> (20 - PAGE_SHIFT);
+
+ /* Use a smaller cluster for small-memory machines */
+ if (megs < 16)
page_cluster = 2;
- else if (num_physpages < ((32 * 1024 * 1024) >> PAGE_SHIFT))
- page_cluster = 3;
else
- page_cluster = 4;
+ page_cluster = 3;
+ /*
+ * Right now other parts of the system means that we
+ * _really_ don't want to cluster much more
+ */
}
|