scx_bpf_get_idle_smtmask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_bpf_get_idle_smtmask β€” like, the whole manual page, bestie

Okay so real talk: this is scx_bpf_get_idle_smtmask(9) from the Kernel API Manual, and it's lowkey one of the cutest little kfuncs in the sched-ext universe. It hands you a referenced kptr to the idle-tracking, per-physical-core cpumask β€” which means you can actually check whether an entire physical core is free. Iconic behaviour, honestly. πŸ¦‹


✨ NAME ✨

scx_bpf_get_idle_smtmask β€” get a referenced kptr to the idle-tracking, per-physical-core cpumask. Can be used to determine if an entire physical core is free. πŸ’–


✨ SYNOPSIS ✨

__bpf_kfunc const struct cpumask * scx_bpf_get_idle_smtmask (const
struct bpf_prog_aux *aux );

✨ ARGUMENTS ✨

  • aux β€” the implicit BPF argument that gives you access to bpf_prog_aux. It's hidden from BPF progs, so like… don't go looking for it, it's not for you bestie πŸ™ˆ

✨ DESCRIPTION ✨

Returns an empty mask if idle tracking is not enabled, or if you're running on a UP kernel. That's the whole vibe check β€” no mask for you in those cases. πŸŽ€

fr fr, "empty mask" is a real answer here, not an error. Don't panic when you get nothing back, it's giving intentional. 😭

✨ SEE ALSO ✨

Kernel file ./kernel/sched/ext/idle.c β€” plus the whole friend group:


🌸 Okay that's the whole page, you ate that. Source/version lives at ./kernel/sched/ext, and this bad girl is dated October 2026 β€” scx_bpf_get_idle_smtmask(9), periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from