scx_bpf_tes...ear_cpu_idle(9)
π scx_bpf_test_and_clear_cpu_idle β NAME
okay so bestie, welcome to the Kernel API Manual β¨ β this one's called scx_bpf_test_and_clear_cpu_idle, and it does exactly what it says on the tin: test and clear @cpu's idle state π
πΈ SYNOPSIS
__bpf_kfunc bool scx_bpf_test_and_clear_cpu_idle (s32 cpu , const struct bpf_prog_aux *aux );
that's the whole signature, no cap π
π¦ ARGUMENTS
cpuβ the cpu we're test-and-clearing the idle state for π§ like, this one right hereauxβ the implicit BPF argument to accessbpf_prog_aux, and it's hidden from BPF progs π so don't come looking for it, it's not for you
β¨ DESCRIPTION
returns true if cpu was idle and its idle state was successfully cleared β
false otherwise π that's it, that's the vibe check.
π¨ important caveat, bestie, do not skip this: it's unavailable ifops.update_idleis implemented andSCX_OPS_KEEP_BUILTIN_IDLEis not set. like, literally not available. so if you're rolling your own idle handling, this function is not your main character π
π SEE ALSO
kernel file: ./kernel/sched/ext/idle.c β that's where the sauce lives π
and the whole friend group π₯:
scx_bpf_cpu_node(9)scx_bpf_select_cpu_dfl(9)__scx_bpf_select_cpu_and(9)scx_bpf_get_idle_cpumask_node(9)scx_bpf_get_idle_cpumask(9)scx_bpf_get_idle_smtmask_node(9)scx_bpf_get_idle_smtmask(9)scx_bpf_put_idle_cpumask(9)scx_bpf_pick_idle_cpu_node(9)scx_bpf_pick_idle_cpu(9)scx_bpf_pick_any_cpu_node(9)scx_bpf_pick_any_cpu(9)
mwah π that's the page! brought to you by ./kernel/sched/ext, dated October 2026 β go clear some idle states, bestie, ily π«Ά
π¦ 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