Index: linux-2.6.17/mm/slab.c =================================================================== --- linux-2.6.17.orig/mm/slab.c 2006-06-19 19:12:02.229401242 -0700 +++ linux-2.6.17/mm/slab.c 2006-06-19 19:12:10.306049957 -0700 @@ -3931,6 +3931,20 @@ done: } +void kmem_cache_reclaim_get(kmem_cache_t *cachep) +{ + struct kmem_list3 *l3 = cachep->nodelists[numa_node_id()]; + + atomic_inc(&l3->reclaim); +} + +void kmem_cache_reclaim_put(kmem_cache_t *cachep) +{ + struct kmem_list3 *l3 = cachep->nodelists[numa_node_id()]; + + atomic_dec(&l3->reclaim); +} + #ifdef CONFIG_PROC_FS static void print_slabinfo_header(struct seq_file *m) Index: linux-2.6.17/include/linux/slab.h =================================================================== --- linux-2.6.17.orig/include/linux/slab.h 2006-06-19 18:03:14.699210844 -0700 +++ linux-2.6.17/include/linux/slab.h 2006-06-19 19:12:10.307026459 -0700 @@ -222,6 +222,10 @@ extern kmem_cache_t *bio_cachep; extern atomic_t slab_reclaim_pages; extern long kmem_cache_reclaim(struct kmem_cache *, unsigned long); + +extern void kmem_cache_reclaim_get(struct kmem_cache *); +extern void kmem_cache_reclaim_put(struct kmem_cache *); + #endif /* __KERNEL__ */ #endif /* _LINUX_SLAB_H */