prune_dcache_sb(9)
πΈ prune_dcache_sb(9) β like, the Kernel API Manual page you actually wanna read π
okay so bestie, welcome to the Kernel API Manual β¨ and today's main character is prune_dcache_sb(9) β the function that trims down the dcache when things get a little too full. no cap, she's lowkey important π
β¨ NAME β¨
prune_dcache_sb β shrink the dcache π¦
π SYNOPSIS π
long prune_dcache_sb (struct super_block *sb , struct shrink_control *sc
);
π ARGUMENTS π
sbβ the superblock, bestie. that's the thing you're pruning πscβ the shrink control, and fr it gets passed along tolist_lru_shrink_walkβ¨
π DESCRIPTION π
so what she does is attempt to shrink the superblock dcache LRU by sc->nr_to_scan entries π
this happens when we need more memory, and it's called from the superblock shrinker function. iykyk π
and like β heads up β this function may fail to free any resources if all the dentries are in use π that's just how it is, not a bug, don't come for her π«Ά
πΈ SEE ALSO πΈ
Kernel file ./fs/dcache.c β¨ plus this whole squad right here:
d_drop(9)dentry_kill(9)__move_to_shrink_list(9)d_find_any_alias(9)d_find_alias(9)shrink_dcache_sb(9)enum d_walk_ret(9)d_walk(9)path_has_submounts(9)shrink_dcache_tree(9)d_invalidate(9)__d_alloc(9)d_alloc(9)d_alloc_pseudo(9)d_instantiate(9)d_obtain_alias(9)d_obtain_root(9)d_add_ci(9)d_same_name(9)__d_lookup_rcu(9)d_lookup(9)__d_lookup(9)d_hash_and_lookup(9)d_delete(9)d_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
okay that's the whole page, you ate that π
this one's from ./fs, dated October 2026 β go off, 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