scx_bpf_get...smtmask_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_bpf_get_idle_smtmask_node β€” from the Kernel API Manual, bestie

okay so picture this: it's giving kernel API, it's giving sched_ext, and the manual name is literally Kernel API Manual β€” so you already know we're in the cool part of the tree 🧚


✨ NAME ✨

scx_bpf_get_idle_smtmask_node β€” grab a referenced kptr to the idle-tracking, per-physical-core cpumask of a target NUMA node. Basically: it tells you whether a whole physical core is free. Obsessed 🫢


🌸 SYNOPSIS 🌸

__bpf_kfunc const struct cpumask * scx_bpf_get_idle_smtmask_node (s32 node , const struct bpf_prog_aux *aux );

πŸŽ€ ARGUMENTS πŸŽ€

  • node β€” the target NUMA node. that's the one, that's the node πŸ‘‘
  • aux β€” an implicit BPF argument that gives you access to bpf_prog_aux, and it's hidden from BPF progs. so like… it's there, you just don't see it πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe check: if idle tracking is not enabled, or if node is not valid, or if you're running on a UP kernel, this thing returns an empty cpumask. literally empty. no bits, no nothing πŸ’€

and in that case, the actual error gets reported to the BPF scheduler via scx_error β€” so don't just sit there wondering, the scheduler gets told, periodt.

🌈 SEE ALSO 🌈

Kernel file ./kernel/sched/ext/idle.c, plus this whole friend group:


⭐ and that's the whole page, bestie β€” brought to you from ./kernel/sched/ext, dated October 2026, straight out of the Kernel API Manual. iykyk, now go pick some idle CPUs πŸ’œπŸŽ€

πŸ“¦ where this page comes from