From: Christoph Lameter Conversion of nr_slab to a per zone counter - Allows reclaim to access counter without looping over processor counts. - Allows accurate statistics on how many pages are used in a zone by the slab. This may become useful to balance slab allocations over various zones. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton --- mm/swap_prefetch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN mm/swap_prefetch.c~swap_prefetch-conversion-of-nr_slab-to-per-zone-counter mm/swap_prefetch.c --- devel/mm/swap_prefetch.c~swap_prefetch-conversion-of-nr_slab-to-per-zone-counter 2006-06-09 02:50:19.000000000 -0700 +++ devel-akpm/mm/swap_prefetch.c 2006-06-09 02:50:19.000000000 -0700 @@ -394,7 +394,9 @@ static int prefetch_suitable(void) * even if the slab is being allocated on a remote node. This * would be expensive to fix and not of great significance. */ - limit = global_page_state(NR_MAPPED) + ps.nr_slab + ps.nr_dirty + + limit = global_page_state(NR_MAPPED) + + global_page_state(NR_SLAB) + + ps.nr_dirty + ps.nr_unstable + total_swapcache_pages; if (limit > ns->prefetch_watermark) { node_clear(node, sp_stat.prefetch_nodes); _