update_if_frozen(9)
π update_if_frozen(9) β a Kernel API Manual moment
okay so bestie, welcome to the update_if_frozen(9) page β¨ this is a little slice of the Kernel API Manual and honestly it's lowkey iconic once you get what it's doing. sit down, grab a boba, we're learning about cgroup freezing π§
πΈ NAME πΈ
update_if_frozen β update whether a cgroup finished freezing
like yes, that's literally the whole vibe: it updates the status of whether a cgroup is done freezing π
β¨ SYNOPSIS β¨
void update_if_frozen (struct cgroup_subsys_state *css );
that's it. that's the whole signature. short and slay π«Ά
π ARGUMENTS π
cssβ css of interest π (yes that's the actual phrase in the docs, and honestly? iconic. it's the css you care about, the main character css, the one we're checking on)
π¦ DESCRIPTION π¦
okay so here's the tea β Once FREEZING is initiated, the transition to FROZEN is lazily updated by calling this function. lazy in the "it happens when you call me" way, not the "i'm not doing my homework" way, bestie π
If the current state is FREEZING but not FROZEN, this function checks whether all tasks of this cgroup and the descendant cgroups finished freezing β and if they did, it sets FROZEN. slay, everyone's frozen, we can update the state π§β¨
π¨ important caller responsibility moment π¨ the caller is responsible for grabbing the RCU read lock and calling update_if_frozen on all descendants prior to invoking this function. not me forgetting the RCU read lockβ¦ couldn't be me π please do it. fr fr.
Task states and freezer state might disagree while tasks are being migrated into or out of css, so we can't verify task states against freezer state here β no cap, it's just not possible in this spot. See freezer_attach for details π (yes, go read that one too, iykyk)
π SEE ALSO π
Kernel file ./kernel/cgroup/legacy_freezer.c ποΈ and the whole friend group:
freezer_css_online(9)freezer_css_offline(9)freezer_fork(9)freezer_apply_state(9)freezer_change_state(9)
go read them all, they're giving lore π
β sign-off β
this page lives in ./kernel/cgroup, dated October 2026, and it's update_if_frozen(9) β that's the whole footer, bestie, and honestly it ate π bye, ily, go freeze some cgroups responsibly π
π₯
π¦ 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