scx_bpf_cpuperf_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to scx_bpf_cpuperf_set(9) from the Kernel API Manual β€” it’s giving β€œtell a CPU what relative performance target to aim for” energy πŸ’…βœ¨

✨ NAME ✨

scx_bpf_cpuperf_set β€” Set the relative performance target of a CPU, periodt. That’s the whole name, no cap πŸ’–

πŸ’– SYNOPSIS πŸ’–

the signature is literally right here β€” copy it exactly, because spelling counts bestie:

__bpf_kfunc void scx_bpf_cpuperf_set (s32 cpu , u32 perf , const struct
       bpf_prog_aux *aux );

πŸŽ€ ARGUMENTS πŸŽ€

  • cpu β€” the CPU of interest 🌸
  • perf β€” the target performance level, and it lives in the range [0, SCX_CPUPERF_ONE] πŸ’–
  • aux β€” the implicit BPF argument to access bpf_prog_aux, hidden from BPF progs πŸ™ˆ so yes, it’s a backstage-pass situation

πŸ’… DESCRIPTION πŸ’…

Set the target performance level of cpu to perf β€” that’s the move. perf is in a linear relative scale between 0 and SCX_CPUPERF_ONE. This determines how the schedutil cpufreq governor chooses the target frequency. Slay πŸ’…

Real talk though: the actual performance level chosen, CPU grouping, and the overhead and latency of the operations are dependent on the hardware and cpufreq driver in use πŸ”. So consult hardware and cpufreq documentation for more information β€” they’re the ones with the receipts. The current performance level can be monitored using scx_bpf_cpuperf_cur β€” iconique πŸ¦‹

πŸ¦‹ SEE ALSO πŸ¦‹

go read these too, iykyk πŸ’œ β€” and yeah, the kernel file is part of the vibe:


🫢 that’s the whole page, bestie β€” it lives in ./kernel/sched/ext, dated October 2026, and it’s titled scx_bpf_cpuperf_set(9) β€” byeee πŸ’‹βœ¨

πŸ“¦ where this page comes from