Messages in this thread Patch in this message | | | Date | Fri, 27 Feb 2004 11:02:11 -0800 | From | Mike Fedyk <> | Subject | Re: 2.6.3-mm3 |
| |
Mike Fedyk wrote: > Nick Piggin wrote: > >> IMO, shrink_slab-for-all-zones.patch and zone-balancing-fix.patch >> should be all you need although they won't shrink the slab as >> much as mm3. They should be pretty easy to port by hand. > > > How does this patch for 2.6.3 look?
Never mind, I was brain dead at the time.
This one should be better.
Mike --- linux-2.6.3/mm/vmscan.c 2004-02-25 20:50:35.000000000 -0800 +++ linux-2.6.3-slab-lofft/mm/vmscan.c 2004-02-25 20:41:45.000000000 -0800 @@ -885,12 +885,10 @@ /* Take a nap, wait for some writeback to complete */ blk_congestion_wait(WRITE, HZ/10); - 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 ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) @@ -962,11 +960,9 @@ max_scan = SWAP_CLUSTER_MAX; to_free -= shrink_zone(zone, max_scan, GFP_KERNEL, to_reclaim, &nr_mapped, ps, priority); - if (i < ZONE_HIGHMEM) { - reclaim_state->reclaimed_slab = 0; - shrink_slab(max_scan + nr_mapped, GFP_KERNEL); - to_free -= reclaim_state->reclaimed_slab; - } + reclaim_state->reclaimed_slab = 0; + shrink_slab(max_scan + nr_mapped, GFP_KERNEL); + to_free -= reclaim_state->reclaimed_slab; if (zone->all_unreclaimable) continue; if (zone->pages_scanned > zone->present_pages * 2) | |