slab.c (cd61ef6268ac52d3dfa5626d1e0306a91b3b2608) slab.c (1e5d533142c1c178a31d4cc81837eb078f9269bc)
1/*
2 * linux/mm/slab.c
3 * Written by Mark Hemment, 1996/97.
4 * (markhe@nextd.demon.co.uk)
5 *
6 * kmem_cache_destroy() + some cleanup - 1999 Andrea Arcangeli
7 *
8 * Major cleanup, different bufctl logic, per-cpu arrays

--- 3249 unchanged lines hidden (view full) ---

3258 ac->avail -= tofree;
3259 memmove(ac->entry, &(ac->entry[tofree]),
3260 sizeof(void*)*ac->avail);
3261 }
3262}
3263
3264/**
3265 * cache_reap - Reclaim memory from caches.
1/*
2 * linux/mm/slab.c
3 * Written by Mark Hemment, 1996/97.
4 * (markhe@nextd.demon.co.uk)
5 *
6 * kmem_cache_destroy() + some cleanup - 1999 Andrea Arcangeli
7 *
8 * Major cleanup, different bufctl logic, per-cpu arrays

--- 3249 unchanged lines hidden (view full) ---

3258 ac->avail -= tofree;
3259 memmove(ac->entry, &(ac->entry[tofree]),
3260 sizeof(void*)*ac->avail);
3261 }
3262}
3263
3264/**
3265 * cache_reap - Reclaim memory from caches.
3266 * @unused: unused parameter
3266 *
3267 * Called from workqueue/eventd every few seconds.
3268 * Purpose:
3269 * - clear the per-cpu caches for this CPU.
3270 * - return freeable pages to the main free memory pool.
3271 *
3272 * If we cannot acquire the cache chain semaphore then just give up - we'll
3273 * try again on the next iteration.

--- 349 unchanged lines hidden ---
3267 *
3268 * Called from workqueue/eventd every few seconds.
3269 * Purpose:
3270 * - clear the per-cpu caches for this CPU.
3271 * - return freeable pages to the main free memory pool.
3272 *
3273 * If we cannot acquire the cache chain semaphore then just give up - we'll
3274 * try again on the next iteration.

--- 349 unchanged lines hidden ---