[PATCH] zone_reclaim: minor fixes 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 line around shrink_zone to show that this is the central function to be called. Signed-off-by: Christoph Lameter Index: linux-2.6.16-rc1-mm2/mm/vmscan.c =================================================================== --- linux-2.6.16-rc1-mm2.orig/mm/vmscan.c 2006-01-20 08:35:10.000000000 -0800 +++ linux-2.6.16-rc1-mm2/mm/vmscan.c 2006-01-20 14:05:22.000000000 -0800 @@ -1868,14 +1868,16 @@ int zone_reclaim(struct zone *zone, gfp_ 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 Index: linux-2.6.16-rc1-mm2/kernel/sysctl.c =================================================================== --- linux-2.6.16-rc1-mm2.orig/kernel/sysctl.c 2006-01-20 08:35:10.000000000 -0800 +++ linux-2.6.16-rc1-mm2/kernel/sysctl.c 2006-01-20 14:05:35.000000000 -0800 @@ -886,7 +886,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 }