resctrl_exit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… resctrl_exit(9) β€” a Kernel API Manual moment ✨

okay bestie, buckle up, we're in the kernel API manual today (yes, the manual, we're fancy now πŸŽ€) and this little function is lowkey one of the most dramatic exits in the whole filesystem game. no cap.


🌸 NAME 🌸

resctrl_exit β€” the one that removes the resctrl filesystem and frees the resources. it's giving cleanup era, it's giving "we're so done here" πŸ’…


✨ SYNOPSIS ✨

void resctrl_exit (void );

literally nothing to pass in, she takes no notes, she takes no prisoners 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments. none. zero. she needs nothing from you, main character energy fr fr πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” the architecture code calls this one in response to a fatal error. yeah, we're in our crisis-management era 😭. what she does is remove the resctrl files and structures from kernfs so nobody can be out here doing further configuration. configuration is cancelled. the vibe has been shut down.

⚠️ okay this part matters, bestie, don't skip it: when the architecture code calls resctrl_exit, all CPUs and resctrl domains must be offline. this is not a suggestion, this is the whole reason the thing is safe.

why tho? because when everything's offline, that ensures the limbo and overflow handlers are not scheduled to run 🌈 β€” which means the data structures they access can actually be freed by resctrl_l3_mon_resource_exit. like, they're not gonna reach back in and grab something that's already been yeeted πŸ’€.

after resctrl_exit returns, the architecture code should return an error from all resctrl_arch_ functions that can do this. all of them. periodt.

and here's the iconic little twist πŸ‘‘: resctrl_arch_get_resource must continue to return struct rdt_resources with the correct rid field β€” because that's what ensures the filesystem can be unmounted. she's still doing her job even after the party's over, we stan a reliable queen 🫢


🧚 SEE ALSO 🧚

the whole friend group got invited to this section, so let's give them their moment πŸ’œ:

like, that's the whole gc in one list πŸ”₯


and that's the page!! πŸŽ€ this little icon came straight out of ./fs/resctrl, dated October 2026, in her full resctrl_exit(9) era. bye bestie, go free those resources responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from