cpu__get_cluster_id(9)
π¦ 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 astruct 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:
cpu_map__is_dummy(9)cpu__get_node(9)cpu__get_socket_id(9)cpu__get_die_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)
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
- 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