find_acpi_cpu_topology(9)
π find_acpi_cpu_topology(9) β from the Kernel API Manual, bestie π
okay so picture this: it's a (9) section page, kernel API manual energy, and the whole thing is about handing you back one (1) unique little number that tells you where a CPU sits in the whole thread/core/cluster/mc_grouping/socket/etc. food chain. she's an icon, she's a lookup function, let's get into it β¨
πΈ SYNOPSIS πΈ
int find_acpi_cpu_topology (unsigned int cpu , int level );
literally the whole signature, no notes π
π¦ ARGUMENTS π¦
cpuβ the kernel logical CPU number, i.e. which CPU you're asking about, bestie π«Άlevelβ the topological level you want a unique ID for β the whole point of the call, no cap π
β¨ DESCRIPTION β¨
so what she does is: determine a topology unique ID for each thread / core / cluster / mc_grouping / socket / etc. π§ that ID is then your little grouping key β peers that match IDs get to be grouped together, fr fr. matching ids = same squad π
and here's the important bit about how the search goes: it terminates when either the requested level is found or we hit a root node. that's it, that's the stop condition π
now β levels beyond the termination point? they'll return the same unique ID. so don't come for her expecting fresh numbers past the finish line, okay π
the unique id for level 0 is the acpi processor id. iconic. everything above level 0 uses a generated value to uniquely identify a topological feature β so level 0 gets the real deal, the rest get handcrafted artisanal generated IDs π
π RETURN π
-ENOENTβ if the PPTT doesn't exist, or the CPU cannot be found π (yes, both of those, same error, that's just how she is)- otherwise β a value which represents a unique topological feature β
π₯ SEE ALSO π₯
kernel file ./drivers/acpi/pptt.c β and the whole bestie squad, all of them, in order, because we don't do partial lists here π
acpi_pptt_walk_cache(9)acpi_count_levels(9)acpi_pptt_leaf_node(9)acpi_find_processor_node(9)update_cache_properties(9)topology_get_acpi_cpu_tag(9)check_acpi_cpu_flag(9)acpi_get_cache_info(9)cache_setup_acpi(9)acpi_pptt_cpu_is_thread(9)find_acpi_cpu_topology_package(9)find_acpi_cpu_topology_cluster(9)find_acpi_cpu_topology_hetero_id(9)acpi_pptt_get_child_cpus(9)acpi_pptt_get_cpus_from_container(9)find_acpi_cache_level_from_id(9)acpi_pptt_get_cpumask_from_cache_id(9)
ngl that's a lot of siblings, but they all ate and left no crumbs π
π a lil sign-off π
this page lives in ./drivers/acpi (that's the source/version vibe, bestie), and it was dated October 2026 β so yes, this manpage is from the future and she's still serving π
kisses, go group your peers correctly, mwah π«Άπ
π¦ 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