The patch which went in six months or so back which said "only reclaim slab if we're scanning lowmem pagecache" was wrong. I must have been asleep at the time. We do need to scan slab in response to highmem page reclaim as well. Because all the math is based around the total amount of memory in the machine, and we know that if we're performing highmem page reclaim then the lower zones have no free memory. --- mm/vmscan.c | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff -puN mm/vmscan.c~shrink_slab-for-all-zones mm/vmscan.c --- 25/mm/vmscan.c~shrink_slab-for-all-zones 2004-02-22 02:20:22.000000000 -0800 +++ 25-akpm/mm/vmscan.c 2004-02-22 02:20:22.000000000 -0800 @@ -924,12 +924,10 @@ int try_to_free_pages(struct zone **zone nr_reclaimed += shrink_caches(zones, priority, &total_scanned, gfp_mask, nr_pages, &ps); - if (zones[0] - zones[0]->zone_pgdat->node_zones < ZONE_HIGHMEM) { - shrink_slab(total_scanned, gfp_mask); - if (reclaim_state) { - nr_reclaimed += reclaim_state->reclaimed_slab; - reclaim_state->reclaimed_slab = 0; - } + shrink_slab(total_scanned, gfp_mask); + if (reclaim_state) { + nr_reclaimed += reclaim_state->reclaimed_slab; + reclaim_state->reclaimed_slab = 0; } if (nr_reclaimed >= nr_pages) { @@ -1023,11 +1021,9 @@ static int balance_pgdat(pg_data_t *pgda zone->temp_priority = priority; reclaimed = shrink_zone(zone, GFP_KERNEL, to_reclaim, &nr_scanned, ps, priority); - if (i < ZONE_HIGHMEM) { - reclaim_state->reclaimed_slab = 0; - shrink_slab(nr_scanned, GFP_KERNEL); - reclaimed += reclaim_state->reclaimed_slab; - } + reclaim_state->reclaimed_slab = 0; + shrink_slab(nr_scanned, GFP_KERNEL); + reclaimed += reclaim_state->reclaimed_slab; to_free -= reclaimed; if (zone->all_unreclaimable) continue; _