SLAB_RECLAIM_ACCOUNT(9)
πΈ SLAB_RECLAIM_ACCOUNT(9) πΈ
okay so bestie, welcome to the Kernel API Manual β this one's a little flag from the slab allocator side of town and it's honestly kind of a big deal β¨
π NAME π
SLAB_RECLAIM_ACCOUNT β the flag that says these objects are reclaimable, and yes that's the whole mood π«Ά
π SYNOPSIS π
SLAB_RECLAIM_ACCOUNT
like, that's it. that's the flag. no args, no drama π
π¦ DESCRIPTION π¦
okay so here's the tea π β you use this flag for caches that have an associated shrinker. that's the whole point, that's the vibe.
because of that, slab pages get allocated with __GFP_RECLAIMABLE π₯ which does two things, and both of them are lowkey important:
- it affects grouping pages by mobility (yes, the pages get sorted by how movable they are, it's giving page-grouping main character energy)
- and those pages get accounted in the
SReclaimablecounter in/proc/meminfoπ β so when you peek at your meminfo, that's where it shows up, iykyk
no cap, that's the entire flag. small flag, big accounting consequences β¨
β SEE ALSO β
the whole squad, fr fr β and hey, peep the kernel file too:
- Kernel file
./include/linux/slab.h SLAB_HWCACHE_ALIGN(9)SLAB_TYPESAFE_BY_RCU(9)SLAB_ACCOUNT(9)struct kmem_cache_args(9)kmem_cache_create_usercopy(9)kmem_cache_create(9)krealloc_node_align(9)kmem_cache_alloc(9)kmem_cache_charge(9)kmalloc(9)kmalloc_nolock(9)__alloc_objs(9)__alloc_flex(9)kmalloc_obj(9)kmalloc_objs(9)kmalloc_flex(9)kmalloc_array(9)krealloc_array(9)kcalloc(9)kzalloc(9)kvmalloc_node(9)kvrealloc_node_align(9)kmalloc_size_roundup(9)
π reminder bestie: if your cache has a shrinker, this flag is the flag. if it doesn't, this ain't it β go read SLAB_ACCOUNT(9) instead, k? π
and that's a wrap, mwah π β this lil page came from ./include/linux, dated October 2026, and it lives in the Kernel API Manual section 9. go be reclaimable, icon ππ
π¦ 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