cpufreq_rem...te_util_hook(9)
π cpufreq_remove_update_util_hook(9) π
okay so bestie, welcome to the Kernel API Manual β this is the page for cpufreq_remove_update_util_hook, and yes the header up top abbreviates it as cpufreq_rem...te_util_hook(9) because apparently even kernel docs need a little drama with their ellipses. anyway. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
cpufreq_remove_update_util_hook β literally just clears the CPU's update_util_data pointer. that's it. that's the whole job. iconic minimalism π
πΈ SYNOPSIS πΈ
void cpufreq_remove_update_util_hook (int cpu );
it returns void, so likeβ¦ don't go looking for a return value, babe. there isn't one. it's giving "no thoughts, head empty, but make it C." π
π ARGUMENTS π
cpuβ the CPU you want to clear the pointer for. that's the one. the chosen one. the CPU in question π
π¦ DESCRIPTION π¦
so what it does: it clears the update_util_data pointer for the given CPU. clear as a freshly wiped mirror, fr fr β¨
BUT β and this is the part where you pay attention, bestie, because this is not a drill π¨ β callers must use RCU callbacks to free any memory that might be accessed via the old update_util_data pointer, or invoke synchronize_rcu right after this function. why? to avoid use-after-free. and use-after-free is that girl who ruins the whole party π so likeβ¦ do the RCU thing. please. for me. π
ngl this is the kind of caveat that looks like a vibe and is actually load-bearing. do not skip it. the memory-safety girlies will come for you π
π SEE ALSO π
- the kernel file
./kernel/sched/cpufreq.c cpufreq_add_update_util_hook(9)β the one that puts the hook in (you know, the opposite of this page π―)cpufreq_this_cpu_can_update(9)
iykyk π
and that's the page!! mwah π this one lives under ./kernel/sched and the docs are stamped October 2026, so likeβ¦ future-dated slay, we love to see it β π bye bestie, go clear those pointers responsibly π§ββοΈπ
π¦ 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