scx_bpf_select_cpu_and(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

scx_bpf_select_cpu_and(9) πŸ’…βœ¨

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for scx_bpf_select_cpu_and, and it's lowkey just scheduler matchmaking. It picks an idle CPU usable by task @p. no cap. πŸ¦‹


🌸 NAME 🌸

scx_bpf_select_cpu_and β€” Pick an idle CPU usable by task @p.

πŸŽ€ SYNOPSIS πŸŽ€

here's the signature, exactly as it is, because we do not edit code in this group chat:

s32 scx_bpf_select_cpu_and (struct task_struct *p , s32 prev_cpu , u64
wake_flags , const struct cpumask *cpus_allowed , u64 flags );

🧚 ARGUMENTS 🧚

okay so the cast of characters:

  • p β€” task_struct to select a CPU for. main character task energy πŸ‘‘
  • prev_cpu β€” CPU p was on previously.
  • wake_flags β€” SCX_WAKE_* flags.
  • cpus_allowed β€” cpumask of allowed CPUs.
  • flags β€” SCX_PICK_IDLE* flags.

πŸ”₯ DESCRIPTION πŸ”₯

This is an inline wrapper that packs scalar arguments into a struct and calls __scx_bpf_select_cpu_and. That's the whole move, bestie. See __scx_bpf_select_cpu_and for details. πŸ‘‘

🌈 SEE ALSO 🌈


okay that's the page! source/version: ./tools/sched_ext/include/scx, date: October 2026. scx_bpf_select_cpu_and(9) out β€” mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from