[PATCH] swap 12/13 vm_enough_memory double counts

From: Hugh Dickins (hugh@veritas.com)
Date: Tue Mar 25 2003 - 17:22:47 EST


Stop vm_enough_memory double counting total_swapcache_pages: it dates
from the days when we didn't free swap when freeing swapcache page.

--- swap11/mm/mmap.c Sun Mar 23 10:30:15 2003
+++ swap12/mm/mmap.c Tue Mar 25 20:44:57 2003
@@ -82,14 +82,6 @@
                 free += nr_swap_pages;
 
                 /*
- * This double-counts: the nrpages are both in the
- * page-cache and in the swapper space. At the same time,
- * this compensates for the swap-space over-allocation
- * (ie "nr_swap_pages" being too small).
- */
- free += total_swapcache_pages;
-
- /*
                  * The code below doesn't account for free space in the
                  * inode and dentry slab cache, slab cache fragmentation,
                  * inodes and dentries which will become freeable under

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



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:21 EST