kmem_cache_shrink(9)
π NAME
kmem_cache_shrink β Shrink a cache.
okay so bestie, welcome to the kmem_cache_shrink(9) page from the Kernel API Manual β¨ this one is literally about shrinking a cache, and it's lowkey iconic for debugging vibes π
πΈ SYNOPSIS
int kmem_cache_shrink (struct kmem_cache *cachep );
π ARGUMENTS
cachepβ the cache to shrink. yes queen, that's the cache you're pointing at π
π¦ DESCRIPTION
Releases as many slabs as possible for a cache.
to help debugging, a zero exit status indicates all slabs were released. that's the little debug signal, iykyk π«Ά
debugging tea β: if the exit status is zero, all slabs got released, periodt.
β¨ RETURN
0β all slabs were released, slay π- non-zero β not all slabs were released, so it's giving "not fully shrunk" π
π SEE ALSO
- Kernel file
./mm/slab_common.c __kmem_cache_create_args(9)kmem_buckets_create(9)kmem_dump_obj(9)kfree_sensitive(9)struct kvfree_rcu_bulk_data(9)struct kfree_rcu_cpu_work(9)struct kfree_rcu_cpu(9)kvfree_rcu_barrier(9)kvfree_rcu_barrier_on_cache(9)
that's the whole page, bestie π«Ά source/version: ./mm Β· date: October 2026 Β· page: kmem_cache_shrink(9) β mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms