[PATCH 10 of 13] limit reclaim if enough pages have been freed

Andrea Arcangeli
2008-01-08T07:50:41Z

# Date 1199470022 -3600
# Node ID 0a13c24681cf4851555c87358fc2ec2465f9ef39
# Parent 6c433e92ef119dd39893c6b54e41154866c32ef8
limit reclaim if enough pages have been freed

No need to wipe out an huge chunk of the cache.

Signed-off-by: Andrea Arcangeli <andrea@suse.de>

diff --git a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1149,6 +1149,8 @@ static unsigned long shrink_zone(int pri
nr_inactive -= nr_to_scan;
nr_reclaimed += shrink_inactive_list(nr_to_scan, zone,
sc);
+ if (nr_reclaimed >= sc->swap_cluster_max)
+ break;