cpu__get_node(9)
π cpu__get_node(9) β like, the Kernel API Manual but make it make sense
okay so bestie, welcome to cpu__get_node π this is from the Kernel API Manual, and it's genuinely one of the more straightforward ones β no cap.
β¨ NAME β¨
cpu__get_node β returns the numa node X as read from /sys/devices/system/node/nodeX for the given CPU. π¦
like, that's it. that's the whole vibe. it goes and looks at what the system says the node is for that CPU, no guessing, no drama. iykyk.
πΈ SYNOPSIS πΈ
int cpu__get_node (struct perf_cpu cpu );
that's the whole signature, periodt. takes a struct perf_cpu called cpu, hands you back an int. iconic behavior honestly.
π ARGUMENTS π
cpuβ ngl bestieβ¦ the original manpage literally just says-- undescribed --π like not a single word about it. so that's all we got, and i'm not about to invent lore that isn't there. it's astruct perf_cpu, the signature tells you that much, and the manpage leaves the rest as a mystery π΅οΈββοΈβ¨
π₯ SEE ALSO π₯
okay this is the fun part, the whole friend group is here π if you liked this one, go say hi to:
- Kernel file
./tools/perf/util/cpumap.hcpu_map__is_dummy(9) cpu__get_socket_id(9)cpu__get_die_id(9)cpu__get_cluster_id(9)cpu__get_core_id(9)cpu_aggr_map__empty_new(9)cpu_aggr_map__new(9)aggr_cpu_id__socket(9)aggr_cpu_id__die(9)aggr_cpu_id__cluster(9)aggr_cpu_id__core(9)aggr_cpu_id__node(9)aggr_cpu_id__global(9)
like, the entire topology-adjacent squad π go read them all, they're all eating.
that's the page!! π mwah π this lil beauty lives in ./tools/perf/util, and it's dated October 2026 β so mark your calendars bestie, see u then π«Άβ¨
π¦ 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