[PATCH] VM: rate limit early reclaim

When early zone reclaim is turned on the LRU is scanned more frequently when a
zone is low on memory.  This limits when the zone reclaim can be called by
skipping the scan if another thread (either via kswapd or sync reclaim) is
already reclaiming from the zone.

Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Martin Hicks
2005-06-21 17:14:43 -07:00
committed by Linus Torvalds
parent 0c35bbadc5
commit 1e7e5a9048
3 changed files with 13 additions and 0 deletions

View File

@@ -149,6 +149,8 @@ struct zone {
* as it fails a watermark_ok() in __alloc_pages?
*/
int reclaim_pages;
/* A count of how many reclaimers are scanning this zone */
atomic_t reclaim_in_progress;
/*
* prev_priority holds the scanning priority for this zone. It is