Re: Large slab cache in 2.6.1

Andrew Morton
2004-02-22T06:09:17Z

Nick Piggin <piggin@cyberone.com.au> wrote:
>
> Although, nr_used_zone_pages probably shouldn't be counting
> highmem zones, which might be our problem.

yeah. We should have made that change when making shrink_slab() ignore
highmem scanning.

Something like this (the function needs a rename)

--- 25/mm/page_alloc.c~shrink_slab-highmem-fix 2004-02-21 22:07:32.000000000 -0800
+++ 25-akpm/mm/page_alloc.c 2004-02-21 22:08:03.000000000 -0800
@@ -769,8 +769,10 @@ unsigned int nr_used_zone_pages(void)
unsigned int pages = 0;
struct zone *zone;

- for_each_zone(zone)
- pages += zone->nr_active + zone->nr_inactive;
+ for_each_zone(zone) {
+ if (zone - zone->zone_pgdat->node_zones < ZONE_HIGHMEM)
+ pages += zone->nr_active + zone->nr_inactive;
+ }

return pages;
}

_