cpu__get_cluster_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so bestie, welcome to the Kernel API Manual ✨ β€” today's main character is cpu__get_cluster_id, and what she does is literally this: she returns the cluster id as read from /sys/devices/system/cpu/cpuX/topology/cluster_id for the given CPU πŸ’–

that's it. that's the whole vibe. no cap, she reads a file and hands you back a number πŸ”₯


🌸 SYNOPSIS 🌸

int cpu__get_cluster_id (struct perf_cpu cpu );

like, she takes one struct perf_cpu and gives you back an int πŸŽ€


✨ ARGUMENTS ✨

  • cpu β€” okay so the docs here literally say -- undescribed -- 😭😭 not me having to tell you that the official manual page does not describe this argument at all. it's giving mystery. it's giving "you'll find out". she's an enigma, your honor πŸ’€ (what we do know from the SYNOPSIS: it's a struct perf_cpu, and it's the CPU whose cluster id you're asking about 🫢)

πŸ‘‘ SEE ALSO πŸ‘‘

bestie you are gonna want the whole friend group, because cluster id does not exist in a vacuum πŸ’… the manpage points you at the Kernel file ./tools/perf/util/cpumap.h, plus all of these icons:

go read them all, i'll wait πŸ’œπŸ¦‹


and that's the whole page, bestie 🌈 she lives in ./tools/perf/util, this edition is dated October 2026, and she answers to the name cpu__get_cluster_id(9) β€” go off, queen πŸ‘‘βœ¨πŸŽ€

πŸ“¦ where this page comes from