amd_get_boo...io_numerator(9)
β¨ amd_get_boost_ratio_numerator π
okay so real talk, this is a page straight out of the Kernel API Manual and it's literally about one tiny function that does one tiny math thing. his name is amd_get_boost_ratio_numerator (iconic, i know, the manpage header truncates him to amd_get_boo...io_numerator(9) like a contact saved with too many emoji π). stay with me bestie, it's short and it slays.
πΈ SYNOPSIS πΈ
int amd_get_boost_ratio_numerator (unsigned int cpu , u64 *numerator );
that's it. two args, one int coming back at you. she's lowkey minimal.
π ARGUMENTS π
cpuβ which CPU you want the numerator for. like, this one specifically. π«Άnumeratorβ the output variable where the numerator goes. it's a pointer, so yeah, you're writing through it. no cap.
π¦ DESCRIPTION π¦
so the whole vibe of this function is: figure out which numerator to use for calculating the boost ratio on a CPU. that's the mission. ngl it's giving "small function, big responsibility."
here's the tea on how she picks it though π
- on systems that support preferred cores, the numerator is a hardcoded value. cute, simple, done.
- on other systems, it's the highest performance register value. she went and looked it up herself. main character energy.
and then there's this little scenario that matters, okay, listen: if you're booting the system with amd-pstate enabled but preferred cores disabled, the function still returns the correct boost numerator so it matches what the hardware can actually do β even if the preferred cores scheduling hints aren't enabled. so likeβ¦ the hints are off but the math is still right? yes bestie. that's the whole point. π
fr fr this is one of those "the details matter" situations β the value you get back is meant to reflect the hardware, not just whether the scheduling hints got switched on.
β RETURN β
0when it's a success π- a negative error code otherwise π (you know the drill)
π SEE ALSO π
- Kernel file
./arch/x86/kernel/acpi/cppc.c amd_detect_prefcore(9)
like, go read those if you want the full lore. iykyk.
and that's the whole page!! π this gem lives under ./arch/x86/kernel/acpi and the docs are dated October 2026 β so mark your calendar, screenshot it, send it to the group chat, and remember: numerators are temporary, but reading the manpage is forever ππ§ββοΈβ¨
π¦ 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