Index: linux-2.6.16-rc2/mm/vmscan.c =================================================================== --- linux-2.6.16-rc2.orig/mm/vmscan.c 2006-02-04 20:23:12.000000000 -0800 +++ linux-2.6.16-rc2/mm/vmscan.c 2006-02-04 20:24:00.000000000 -0800 @@ -58,8 +58,6 @@ struct scan_control { /* Incremented by the number of pages reclaimed */ unsigned long nr_reclaimed; - unsigned long nr_mapped; /* From page_state */ - /* This context's GFP mask */ gfp_t gfp_mask; @@ -1157,7 +1155,7 @@ done: * But we had to alter page->flags anyway. */ static void -refill_inactive_zone(int nr_pages, struct zone *zone, struct scan_control *sc) +refill_inactive_zone(int nr_pages, struct zone *zone) { int pgmoved; int pgdeactivate = 0; @@ -1191,7 +1189,7 @@ refill_inactive_zone(int nr_pages, struc * mapped memory instead of just pagecache. Work out how much memory * is mapped. */ - mapped_ratio = (sc->nr_mapped * 100) / total_memory; + mapped_ratio = (read_page_state(nr_mapped) * 100) / total_memory; /* * Now decide how much we really want to unmap some pages. The mapped @@ -1319,7 +1317,7 @@ shrink_zone(int priority, struct zone *z nr_to_scan = min(nr_active, (unsigned long)sc->swap_cluster_max); nr_active -= nr_to_scan; - refill_inactive_zone(nr_to_scan, zone, sc); + refill_inactive_zone(nr_to_scan, zone); } if (nr_inactive) { @@ -1416,7 +1414,6 @@ int try_to_free_pages(struct zone **zone } for (priority = DEF_PRIORITY; priority >= 0; priority--) { - sc.nr_mapped = read_page_state(nr_mapped); sc.nr_scanned = 0; sc.nr_reclaimed = 0; sc.swap_cluster_max = SWAP_CLUSTER_MAX; @@ -1504,7 +1501,6 @@ loop_again: sc.gfp_mask = GFP_KERNEL; sc.may_writepage = !laptop_mode; sc.may_swap = 1; - sc.nr_mapped = read_page_state(nr_mapped); inc_page_state(pageoutrun); @@ -1863,7 +1859,6 @@ int zone_reclaim(struct zone *zone, gfp_ sc.may_swap = !!(zone_reclaim_mode & RECLAIM_SWAP); sc.nr_scanned = 0; sc.nr_reclaimed = 0; - sc.nr_mapped = read_page_state(nr_mapped); sc.gfp_mask = gfp_mask; disable_swap_token();