include/linux/mmzone.h | 1 + mm/page_alloc.c | 1 + mm/vmscan.c | 9 +++------ 3 files changed, 5 insertions(+), 6 deletions(-) Index: linux-2.6-uml/include/linux/mmzone.h =================================================================== --- linux-2.6-uml.orig/include/linux/mmzone.h 2006-02-19 16:40:25.000000000 +0100 +++ linux-2.6-uml/include/linux/mmzone.h 2006-02-22 17:37:08.000000000 +0100 @@ -152,6 +152,7 @@ struct zone { /* Fields commonly accessed by the page reclaim scanner */ spinlock_t lru_lock; + unsigned long nr_scan; struct page_replace_data policy; unsigned long pages_scanned; /* since last reclaim */ int all_unreclaimable; /* All pages pinned */ Index: linux-2.6-uml/mm/vmscan.c =================================================================== --- linux-2.6-uml.orig/mm/vmscan.c 2006-02-22 17:36:42.000000000 +0100 +++ linux-2.6-uml/mm/vmscan.c 2006-02-22 17:37:08.000000000 +0100 @@ -1006,15 +1006,12 @@ int should_reclaim_mapped(struct zone *z static void shrink_zone(struct zone *zone, struct scan_control *sc) { - unsigned long nr_scan; - atomic_inc(&zone->reclaim_in_progress); - nr_scan = (__page_replace_nr_scan(zone) >> sc->priority) + SWAP_CLUSTER_MAX; - nr_scan &= ~(SWAP_CLUSTER_MAX - 1); + zone->nr_scan += __page_replace_nr_scan(zone) >> sc->priority; - while (nr_scan >= SWAP_CLUSTER_MAX) { - nr_scan -= SWAP_CLUSTER_MAX; + while (zone->nr_scan >= SWAP_CLUSTER_MAX) { + zone->nr_scan -= SWAP_CLUSTER_MAX; shrink_cache(zone, sc); } Index: linux-2.6-uml/mm/page_alloc.c =================================================================== --- linux-2.6-uml.orig/mm/page_alloc.c 2006-02-19 16:40:25.000000000 +0100 +++ linux-2.6-uml/mm/page_alloc.c 2006-02-22 17:37:08.000000000 +0100 @@ -2043,6 +2043,7 @@ static void __init free_area_init_core(s zone->temp_priority = zone->prev_priority = DEF_PRIORITY; zone_pcp_init(zone); + zone->nr_scan = 0; page_replace_init_zone(zone); atomic_set(&zone->reclaim_in_progress, 0); if (!size)