scx_bpf_get_idle_cpumask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 at bpf_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:

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