[PATCH] vm_swap_full bogus

Hugh Dickins (hugh@veritas.com)
Fri, 2 Nov 2001 22:29:58 +0000 (GMT)


Just noticed bogus vm_swap_full() macro since 2.4.10:
swapper_space.nrpages counts _cached_ swap, not used swap.
Either I'm confused again, or... please apply!

Hugh

--- 2.4.14-pre7/mm/memory.c Fri Nov 2 06:22:15 2001
+++ linux/mm/memory.c Fri Nov 2 22:13:19 2001
@@ -1068,7 +1068,7 @@

/* Swap 80% full? Release the pages as they are paged in.. */
#define vm_swap_full() \
- (swapper_space.nrpages*5 > total_swap_pages*4)
+ (nr_swap_pages*5 < total_swap_pages)

/*
* We hold the mm semaphore and the page_table_lock on entry and

-
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/