mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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>
This commit is contained in:
parent
52a8363eae
commit
c84db23c6e
2 changed files with 5 additions and 2 deletions
|
@ -878,7 +878,8 @@ static ctl_table vm_table[] = {
|
||||||
.maxlen = sizeof(zone_reclaim_mode),
|
.maxlen = sizeof(zone_reclaim_mode),
|
||||||
.mode = 0644,
|
.mode = 0644,
|
||||||
.proc_handler = &proc_dointvec,
|
.proc_handler = &proc_dointvec,
|
||||||
.strategy = &zero,
|
.strategy = &sysctl_intvec,
|
||||||
|
.extra1 = &zero,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
{ .ctl_name = 0 }
|
{ .ctl_name = 0 }
|
||||||
|
|
|
@ -1636,14 +1636,16 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
|
||||||
p->flags |= PF_MEMALLOC;
|
p->flags |= PF_MEMALLOC;
|
||||||
reclaim_state.reclaimed_slab = 0;
|
reclaim_state.reclaimed_slab = 0;
|
||||||
p->reclaim_state = &reclaim_state;
|
p->reclaim_state = &reclaim_state;
|
||||||
|
|
||||||
shrink_zone(zone, &sc);
|
shrink_zone(zone, &sc);
|
||||||
|
|
||||||
p->reclaim_state = NULL;
|
p->reclaim_state = NULL;
|
||||||
current->flags &= ~PF_MEMALLOC;
|
current->flags &= ~PF_MEMALLOC;
|
||||||
|
|
||||||
if (sc.nr_reclaimed == 0)
|
if (sc.nr_reclaimed == 0)
|
||||||
zone->last_unsuccessful_zone_reclaim = jiffies;
|
zone->last_unsuccessful_zone_reclaim = jiffies;
|
||||||
|
|
||||||
return sc.nr_reclaimed > nr_pages;
|
return sc.nr_reclaimed >= nr_pages;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue