aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2006-02-01 06:05:29 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:15 -0500
commitc84db23c6e587d3ab00a41c51fedf758e1f6ecd4 (patch)
treef1e31810b14a71ccbb9963e018076212eb267ee9 /mm/vmscan.c
parent52a8363eae3872af15880292ff4e06d0fab36986 (diff)
[PATCH] zone_reclaim: minor fixes
- If we only reclaim nr_pages then its okay to stay on node. Switch from > to >= for the comparison. - vm_table[] entry for zone_reclaim_mode is a bit screwed up. - Add empty lines around shrink_zone to show that this is the central function to be called. 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, 3 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index a29efb2c06c8..61ca0097c834 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1636,14 +1636,16 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
1636 p->flags |= PF_MEMALLOC; 1636 p->flags |= PF_MEMALLOC;
1637 reclaim_state.reclaimed_slab = 0; 1637 reclaim_state.reclaimed_slab = 0;
1638 p->reclaim_state = &reclaim_state; 1638 p->reclaim_state = &reclaim_state;
1639
1639 shrink_zone(zone, &sc); 1640 shrink_zone(zone, &sc);
1641
1640 p->reclaim_state = NULL; 1642 p->reclaim_state = NULL;
1641 current->flags &= ~PF_MEMALLOC; 1643 current->flags &= ~PF_MEMALLOC;
1642 1644
1643 if (sc.nr_reclaimed == 0) 1645 if (sc.nr_reclaimed == 0)
1644 zone->last_unsuccessful_zone_reclaim = jiffies; 1646 zone->last_unsuccessful_zone_reclaim = jiffies;
1645 1647
1646 return sc.nr_reclaimed > nr_pages; 1648 return sc.nr_reclaimed >= nr_pages;
1647} 1649}
1648#endif 1650#endif
1649 1651