scx_bpf_sub_dispatch(9)
π 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 accessbpf_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_idis 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:
scx_skip_subtree_pre(9)scx_next_descendant_pre(9)scx_rescue_charge(9)scx_rescue_end(9)scx_rescue_keep(9)scx_rescue_accrue(9)scx_rescue_admit(9)scx_rescue_try_admit(9)scx_rescue_check_overload(9)scx_rescue_timerfn(9)scx_resolve_local_dsq(9)queue_sync_ecaps(9)scx_process_sync_ecaps(9)scx_unbypass_replay_ecaps(9)scx_discard_stale_ecaps_syncs(9)scx_rehome_task(9)scx_punt_task(9)scx_cgroup_claim_subtree(9)scx_cgroup_return_subtree(9)scx_cgroup_task_migrating(9)scx_cgroup_task_migrated(9)scx_cgroup_task_migrate_canceled(9)scx_bpf_sub_grant(9)scx_bpf_sub_revoke(9)scx_bpf_sub_caps(9)scx_bpf_sub_kill_bstr(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms