cgroup_lock...rain_offline(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cgroup_lock_and_drain_offline(9) β€” from the Kernel API Manual ✨

okay bestie, buckle up, because this one's a little locking moment and it's honestly kind of iconic. it lives in the Kernel API Manual, section 9, and the page title gets truncated all cute to cgroup_lock...rain_offline(9) β€” iykyk πŸ’–


✨ NAME ✨

cgroup_lock_and_drain_offline β€” grab cgroup_mutex and drain offlined csses, no cap 🫢


πŸŽ€ SYNOPSIS πŸŽ€

void cgroup_lock_and_drain_offline (struct cgroup *cgrp );

🌸 ARGUMENTS 🌸

  • cgrp β€” the root of the target subtree. that's it, that's the whole vibe check πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, and it's genuinely important: css offlining is asynchronous. which means userland can be out here living its life, trying to re-enable a controller while the previous css is literally still around πŸ‘€ awkward.

so this function steps in and handles it: it grabs cgroup_mutex and then drains the previous css instances of cgrp's subtree. like a bouncer clearing the room before the next party, periodt πŸ’…βœ¨

no waiting-around-for-it-to-happen-yourself energy, it locks and drains, together, in one function. slay.


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr β€” plus the kernel file ./kernel/cgroup/cgroup.c where all this lives 🧚


and that's the whole page, bestie 🫢 this one ships out of <pink>./kernel/cgroup</pink> and is dated October 2026 β€” go forth and drain those offlined csses responsibly, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from