From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 10 of 11] limit reclaim if enough pages have been freed Message-Id: <30fd9dd17ca34a24f066.1199326156@v2.random> In-Reply-To: Date: Thu, 03 Jan 2008 03:09:16 +0100 From: Andrea Arcangeli Sender: owner-linux-mm@kvack.org Return-Path: To: linux-mm@kvack.org Cc: Andrew Morton , David Rientjes List-ID: # HG changeset patch # User Andrea Arcangeli # Date 1199325619 -3600 # Node ID 30fd9dd17ca34a24f0666be2e5e52d3369b0090b # Parent 03ad5aceb1e3e64d53a3537bc86dba8c268b1954 limit reclaim if enough pages have been freed No need to wipe out an huge chunk of the cache. Signed-off-by: Andrea Arcangeli 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; } } -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org