Unreclaimable pages: Remove all_unreclaimable The lru lists will now be empty if all pages are not reclaimable. There is no purpose anymore for the all_unreclaimable flag. Signed-off-by: Christoph Lameter Index: linux-2.6/mm/vmscan.c =================================================================== --- linux-2.6.orig/mm/vmscan.c 2007-07-31 18:43:50.000000000 -0700 +++ linux-2.6/mm/vmscan.c 2007-07-31 18:49:07.000000000 -0700 @@ -65,8 +65,6 @@ struct scan_control { int swappiness; - int all_unreclaimable; - int order; }; @@ -1081,7 +1079,6 @@ static unsigned long shrink_zones(int pr unsigned long nr_reclaimed = 0; int i; - sc->all_unreclaimable = 1; for (i = 0; zones[i] != NULL; i++) { struct zone *zone = zones[i]; @@ -1093,11 +1090,6 @@ static unsigned long shrink_zones(int pr note_zone_scanning_priority(zone, priority); - if (zone->all_unreclaimable && priority != DEF_PRIORITY) - continue; /* Let kswapd poll it */ - - sc->all_unreclaimable = 0; - nr_reclaimed += shrink_zone(priority, zone, sc); } return nr_reclaimed; @@ -1180,7 +1172,7 @@ unsigned long try_to_free_pages(struct z congestion_wait(WRITE, HZ/10); } /* top priority shrink_caches still had more to do? don't OOM, then */ - if (!sc.all_unreclaimable) + if (priority < 0) ret = 1; out: /* @@ -1274,9 +1266,6 @@ loop_again: if (!populated_zone(zone)) continue; - if (zone->all_unreclaimable && priority != DEF_PRIORITY) - continue; - if (!zone_watermark_ok(zone, order, zone->pages_high, 0, 0)) { end_zone = i; @@ -1309,9 +1298,6 @@ loop_again: if (!populated_zone(zone)) continue; - if (zone->all_unreclaimable && priority != DEF_PRIORITY) - continue; - if (!zone_watermark_ok(zone, order, zone->pages_high, end_zone, 0)) all_zones_ok = 0; @@ -1324,12 +1310,6 @@ loop_again: lru_pages); nr_reclaimed += reclaim_state->reclaimed_slab; total_scanned += sc.nr_scanned; - if (zone->all_unreclaimable) - continue; - if (nr_slab == 0 && zone->pages_scanned >= - (zone_page_state(zone, NR_ACTIVE) - + zone_page_state(zone, NR_INACTIVE)) * 6) - zone->all_unreclaimable = 1; /* * If we've done a decent amount of scanning and * the reclaim ratio is low, start doing writepage @@ -1495,9 +1475,6 @@ static unsigned long shrink_all_zones(un if (!populated_zone(zone)) continue; - if (zone->all_unreclaimable && prio != DEF_PRIORITY) - continue; - /* For pass = 0 we don't shrink the active list */ if (pass > 0) { zone->nr_scan_active += @@ -1819,7 +1796,6 @@ int zone_reclaim(struct zone *zone, gfp_ * then do not scan. */ if (!(gfp_mask & __GFP_WAIT) || - zone->all_unreclaimable || atomic_read(&zone->reclaim_in_progress) > 0 || (current->flags & PF_MEMALLOC)) return 0;