cpuhp_state_add_instance(9)
β¨ cpuhp_state_add_instance β¨
okay bestie, welcome to the Kernel API Manual β today's main character is cpuhp_state_add_instance, and honestly? she's giving "I just plugged a new instance into a CPU hotplug state and then went and told everyone about it." π
πΈ NAME πΈ
cpuhp_state_add_instance β Add an instance for a state and invoke startup callback.
like, that's literally her whole job. no notes. π
π¦ SYNOPSIS π¦
int cpuhp_state_add_instance (enum cpuhp_state state , struct hlist_node *node );
returns an int, takes two things, that's it, we love a low-maintenance icon. β¨
π ARGUMENTS π
stateβ the state for which the instance is installed. yes queen, tell us which state we're doing this for. πnodeβ the node for this individual state. one node, one instance, one vibe check. π«Ά
π₯ DESCRIPTION π₯
so what actually happens? cpuhp_state_add_instance installs the instance for the state, and then it invokes the registered startup callback on the online cpus which have already reached that state. fr fr, she doesn't just sit there looking pretty β she also pings every cpu that's already past the finish line so nobody's left out. π
β οΈ okay this part matters, bestie: the state must have been earlier marked as multi-instance by cpuhp_setup_state_multi. if you skipped that step, congratulations, you're in undefined territory β do not pass go, do not collect $200. π
π SEE ALSO π
the whole friend group, gathered for the group chat π¬ β and yeah, it's a long one, but every single one is here, no gatekeeping:
- Kernel file
./include/linux/cpuhotplug.h cpuhp_setup_state(9)cpuhp_setup_state_cpuslocked(9)cpuhp_setup_state_nocalls(9)cpuhp_setup_state_nocalls_cpuslocked(9)cpuhp_setup_state_multi(9)cpuhp_state_add_instance_nocalls(9)cpuhp_state_add_instance_nocalls_cpuslocked(9)cpuhp_remove_state(9)cpuhp_remove_state_nocalls(9)cpuhp_remove_state_nocalls_cpuslocked(9)cpuhp_remove_multi_state(9)cpuhp_state_remove_instance(9)cpuhp_state_remove_instance_nocalls(9)
aaaand that's the page!! π
β¨ this lil baddie lives in ./include/linux, wears a Kernel API Manual label, and was last seen slaying in October 2026. mwah, go add those instances bestie ππ¦πΈπ
π¦ 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