scx_bpf_sub_dispatch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_bpf_sub_dispatch(9) β€” from the Kernel API Manual, bestie ✨

okay so picture this: you're a parent scheduler and your kid scheduler needs to actually do something. that's this kfunc. welcome to the group chat 🫢


✨ NAME ✨

scx_bpf_sub_dispatch β€” ngl it's literally the thing that triggers dispatching on a child scheduler πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

__bpf_kfunc bool scx_bpf_sub_dispatch (u64 cgroup_id , const struct
bpf_prog_aux *aux );

that's it. that's the whole vibe check. πŸ‘‘


🌸 ARGUMENTS 🌸

  • cgroup_id β€” the cgroup ID of the child scheduler you want to dispatch. yes, that cgroup ID. 🎯
  • aux β€” the implicit BPF argument used to access bpf_prog_aux, and it's hidden from BPF progs. so like… it's there, but you don't get to see it. main character energy that stays backstage πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the lore: this lets a parent scheduler trigger dispatching on one of its direct child schedulers. the child then runs its own dispatch operation, which moves tasks from dispatch queues over to the local runqueue. that's the whole plot, no cap. ✨


⭐ RETURN ⭐

it returns true on success πŸ’–

and it returns false if:

  • cgroup_id is invalid 😭
  • it's not a direct child 😭
  • the caller lacks dispatch permission 😭
fr fr, watch out for all three of those β€” you'll just get a false and no dispatch πŸ˜”

🌈 SEE ALSO 🌈

the whole friend group πŸ‘―β€β™€οΈ β€” kernel file ./kernel/sched/ext/sub.c plus:


and that's the page!! 🧚 source path is ./kernel/sched/ext, dated October 2026, and it's scx_bpf_sub_dispatch(9) all the way down. mwah πŸ’‹ slay, go dispatch something πŸ”₯

πŸ“¦ where this page comes from