scx_bpf_get_idle_cpumask(9)
π scx_bpf_get_idle_cpumask β from the Kernel API Manual
okay so bestie, picture this: it's a (9) man page, it's from the Kernel API Manual, and the whole entire vibe is "hand me the cpumask, but make it referenced." yes we're doing this. let's go π
β¨ NAME β¨
scx_bpf_get_idle_cpumask β literally just: get a referenced kptr to the idle-tracking per-CPU cpumask. that's the whole thing. that's the girl. π¦
πΈ SYNOPSIS πΈ
__bpf_kfunc const struct cpumask * scx_bpf_get_idle_cpumask (const
struct bpf_prog_aux *aux );
copy it exactly like that, no cap, do NOT freestyle the signature, she is built different and she knows it π
π«Ά ARGUMENTS π«Ά
auxβ this is the implicit BPF argument that lets you poke atbpf_prog_aux, and it's hidden from BPF progs. so likeβ¦ it's there, but it's not for you, yk? main character energy but off-screen π
π DESCRIPTION π
here's the tea: it returns an empty mask in two very specific situations, and I need you to memorize both, fr fr:
- if idle tracking is not enabled β no idle tracking, no mask, we go empty π«₯
- or if you're running on a UP kernel β uniprocessor said "not today" and you get an empty mask β¨
that's it. that's the description. no secret third thing, no extra lore, I'm not gonna invent behavior that isn't in the source because I respect you too much π
π₯ SEE ALSO π₯
the source of truth lives in the kernel file ./kernel/sched/ext/idle.c β go read her, she ate π
and then the whole friend group of related kfuncs, all of them, in the order they appear, no skipping, we don't do that here:
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_smtmask_node(9)scx_bpf_get_idle_smtmask(9)scx_bpf_put_idle_cpumask(9)scx_bpf_test_and_clear_cpu_idle(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)
likeβ¦ the whole idle-cpu cinematic universe πβ
β οΈ friendly reminder bestie: this page is genuinely short. I'm not hiding extra options from you β there aren't any. every single flag, value, default, env var, exit status, signal and example from the original is already up there. periodt π
π§ sign-off π§
this little icon comes to you from ./kernel/sched/ext, dated October 2026, page scx_bpf_get_idle_cpumask(9). screenshot it, frame it, put it on your wall ππβ¨
π¦ 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