projects/linux·commit c84db23c

[PATCH] zone_reclaim: minor fixes

c84db23c · Christoph Lameter <[email protected]> · 2006-02-01 03:05:29 -08:00

- 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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
c84db23c6e587d3ab00a41c51fedf758e1f6ecd4
Parents
52a8363e

Changes

2 files changed · +5 −2

FileStatusAddDelContent
kernel/sysctl.cmodified+2−1View file
mm/vmscan.cmodified+3−1View file

kernel/sysctl.c

View file
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index cb99a42..c74f03b 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -878,7 +878,8 @@ static ctl_table vm_table[] = {
.maxlen = sizeof(zone_reclaim_mode),
.mode = 0644,
.proc_handler = &proc_dointvec,
- .strategy = &zero,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
},
#endif
{ .ctl_name = 0 }

mm/vmscan.c

View file
diff --git a/mm/vmscan.c b/mm/vmscan.c
index a29efb2..61ca009 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)
p->flags |= PF_MEMALLOC;
reclaim_state.reclaimed_slab = 0;
p->reclaim_state = &reclaim_state;
+
shrink_zone(zone, &sc);
+
p->reclaim_state = NULL;
current->flags &= ~PF_MEMALLOC;
if (sc.nr_reclaimed == 0)
zone->last_unsuccessful_zone_reclaim = jiffies;
- return sc.nr_reclaimed > nr_pages;
+ return sc.nr_reclaimed >= nr_pages;
}
#endif