aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2006-02-01 06:05:33 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:16 -0500
commit2a11ff06d7d12be5d1bbcf592fff649b45ac2388 (patch)
treecef86d3f60b6ae5b3dab277a554a92a8e08d903b /mm/vmscan.c
parenta92f71263af9d0ab77c260f709c0c079656221aa (diff)
[PATCH] zone_reclaim: configurable off node allocation period.
Currently the zone_reclaim code has a fixed window of 30 seconds of off node allocations should a local zone have no unused pagecache pages left. Reclaim will be attempted again after this timeout period to avoid repeated useless scans for memory. This is also useful to established sufficiently large off node allocation chunks to relieve the local node. It may be beneficial to adjust that time period for some special situations. For example if memory use was exceeding node capacity one may want to give up for longer periods of time. If memory spikes intermittendly then one may want to shorten the time period to reduce the number of off node allocations. This patch allows just that.... Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f8b94ea6f722..8760a4abfa1f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1595,7 +1595,7 @@ int zone_reclaim_mode __read_mostly;
1595/* 1595/*
1596 * Mininum time between zone reclaim scans 1596 * Mininum time between zone reclaim scans
1597 */ 1597 */
1598#define ZONE_RECLAIM_INTERVAL 30*HZ 1598int zone_reclaim_interval __read_mostly = 30*HZ;
1599 1599
1600/* 1600/*
1601 * Priority for ZONE_RECLAIM. This determines the fraction of pages 1601 * Priority for ZONE_RECLAIM. This determines the fraction of pages
@@ -1617,7 +1617,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
1617 int node_id; 1617 int node_id;
1618 1618
1619 if (time_before(jiffies, 1619 if (time_before(jiffies,
1620 zone->last_unsuccessful_zone_reclaim + ZONE_RECLAIM_INTERVAL)) 1620 zone->last_unsuccessful_zone_reclaim + zone_reclaim_interval))
1621 return 0; 1621 return 0;
1622 1622
1623 if (!(gfp_mask & __GFP_WAIT) || 1623 if (!(gfp_mask & __GFP_WAIT) ||