proc_flush_pid(9)
π¦ proc_flush_pid β kernel API vibes π
okay so bestie, this page is from the Kernel API Manual and it's literally about tidying up after a process is gone, iykyk β¨
πΈ NAME πΈ
proc_flush_pid β remove dcache entries for @pid from the /proc dcache π§Ήπ
π SYNOPSIS π
void proc_flush_pid (struct pid *pid );
β¨ ARGUMENTS β¨
pidβ the pid that should be flushed, periodt π«Ά
π₯ DESCRIPTION π₯
so what this does is it walks a list of inodes (and bestie, these are inodes that belong to any proc filesystem, no cap) that are attached to the pid, and flushes them out of the dentry cache. it's giving cleanup era π§β¨
ngl it's totally safe and reasonable to cache /proc entries for a task until that task exits β that part is iconic, we love a cache π. but after the task exits? those entries just clog up the dcache with useless entries, and they can possibly cause useful dcache entries to get flushed instead π which is so not the vibe.
this routine exists specifically to flush those useless dcache entries away when a process is reaped. main character energy for the reaper fr fr π
π NOTE π
okay important caveat bestie: this routine is just an optimization π so it does not guarantee that no dcache entries will exist after a process is reaped β it just makes it very unlikely that any will persist. lowkey humble of it, honestly π
π SEE ALSO π
- Kernel file
./fs/proc/base.cπ
and that's the whole page, bestie β you ate that π β¨
signed off with love from ./fs/proc, dated October 2026, 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