--- 2.4/mm/slab.c Fri Aug 30 18:39:22 2002 +++ build-2.4/mm/slab.c Fri Sep 27 21:01:31 2002 @@ -1727,6 +1735,9 @@ } #endif +unsigned long g_calls = 0; +unsigned long g_pages = 0; +unsigned long g_success = 0; /** * kmem_cache_reap - Reclaim memory from caches. * @gfp_mask: the type of memory required. @@ -1749,6 +1760,7 @@ if (down_trylock(&cache_chain_sem)) return 0; +g_calls++; scan = REAP_SCANLEN; best_len = 0; best_pages = 0; @@ -1827,6 +1839,8 @@ perfect: /* free only 50% of the free slabs */ best_len = (best_len + 1)/2; +g_success++; +g_pages+=best_len; for (scan = 0; scan < best_len; scan++) { struct list_head *p; @@ -1907,6 +1921,7 @@ * Output format version, so at least we can change it * without _too_ many complaints. */ + seq_printf(m, "%lu %lu %lu.\n",g_calls, g_pages, g_success); seq_puts(m, "slabinfo - version: 1.1" #if STATS " (statistics)"