try_offline_node(9)
π try_offline_node β Kernel API Manual β¨
okay so bestie, welcome to the try_offline_node(9) page π«Ά it's a lil kernel API moment, and honestly? she's short but she matters. let's get into it π
πΈ NAME πΈ
try_offline_node β (and yes the original literally leaves the description blank, no cap, not me making that up π she's mysterious like that)
β¨ SYNOPSIS β¨
void try_offline_node (int nid );
that's it. that's the whole signature. clean, simple, iconic π
π ARGUMENTS π
nidβ the node ID π« literally just which node we're talking about, that's the whole vibe check
π¦ DESCRIPTION π¦
so what does she do? okay so listen: try_offline_node offlines a node β but only if all memory sections and cpus of the node are removed. both conditions, bestie. memory sections βοΈ cpus βοΈ then she'll offline that node for you. it's giving conditional queen energy π if stuff's still hanging around on that node, she's simply not doing it, periodt π
β οΈ NOTE β οΈ
π¨ real talk, don't skip this one π¨ the caller must call lock_device_hotplug to serialize hotplug and online/offline operations before this call. like, before-before. this is not a suggestion, it's the rule π skipping the lock is how you get chaotic race condition energy and nobody wants that π
β SEE ALSO β
kernel file ./mm/memory_hotplug.c ποΈ and her besties:
__remove_pages(9)__add_memory_driver_managed(9)add_memory_driver_managed(9)__remove_memory(9)offline_and_remove_memory_ranges(9)
go read them, iykyk π
and that's the page!! π written from the ./mm corner of the kernel, dated October 2026 β thanks for reading bestie, go call lock_device_hotplug first fr fr πβ¨π¦
π¦ 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