register_node(9)
π register_node(9) β from the Kernel API Manual, bestie π
okay so you're in the kernel docs, section 9, and the page is register_node. welcome, you're gonna do great π«Ά
β¨ NAME β¨
register_node β literally sets up the node device and gets it registered. that's the whole vibe check: initialize + register, one function, no cap π
β¨ SYNOPSIS β¨
int register_node (int nid );
β¨ ARGUMENTS β¨
nidβ the node number you want to use when the device gets created. that's it. that's the whole argument. pick your node number, hand it over, she's off πΈ
β¨ RETURN β¨
0 on success β slay, iconic, we love a clean zero β¨
-errno otherwise β i.e. it failed and you get the negative errno back so you know why. not me getting a -errno... π check it!! fr fr π
β¨ SEE ALSO β¨
go snoop around the kernel file ./drivers/base/node.c β that's where the magic lives π¦ and while you're there, these are the friends of the family:
struct node_access_nodes(9)node_set_perf_attrs(9)node_update_perf_attrs(9)struct node_cache_info(9)node_add_cache(9)register_memory_node_under_compute_node(9)unregister_node(9)
iykyk, the whole node.c friend group is lowkey carrying ππ₯ go read them, they're giving main character energy π
π‘ reminder:register_nodegives you0or-errnoβ never assume success, bestie. check the return value every time. periodt π
source page lives in ./drivers/base and it's dated October 2026 β and yes we're still calling it register_node(9) around here πβ¨
π¦ 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