arch_scale_cpu_capacity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… arch_scale_cpu_capacity(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for arch_scale_cpu_capacity β€” yes, we're getting into CPU capacity scale factors and it's gonna be iconic ✨


✨ NAME ✨

arch_scale_cpu_capacity β€” get the capacity scale factor of a given CPU. That's the whole assignment, no cap. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned long arch_scale_cpu_capacity (int cpu );

πŸŽ€ ARGUMENTS πŸŽ€

  • cpu β€” the CPU in question. Like, which CPU are we talking about? That one. πŸ‘‘

🌸 RETURN 🌸

You get the CPU scale factor normalized against SCHED_CAPACITY_SCALE, i.e. the formula down in DESCRIPTION. Normalized, bestie β€” that's the vibe. ✨

πŸ”₯ DESCRIPTION πŸ”₯

Here's the actual shape of it, no cap:

max_perf(cpu) ----------------------------- * SCHED_CAPACITY_SCALE
max(max_perf(c) : c in CPUs)

It's giving "compare this CPU's max_perf(cpu) against the max max_perf(c) across all CPUs in CPUs, then scale it by SCHED_CAPACITY_SCALE." The formula ate and left no crumbs πŸ’…

🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/sched/topology.h β€” go peek, iykyk 🫢

xoxo, your girl πŸ’– β€” source/version: ./include/linux/sched; dated October 2026; manual page: arch_scale_cpu_capacity(9) β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from