scx_bpf_sub_kill_bstr(9)
π scx_bpf_sub_kill_bstr β like, the Kernel API Manual (section 9) page you didn't know you needed π
okay bestie, sit down, hydrate, and let me tell you about scx_bpf_sub_kill_bstr β yes that's the whole name, no I did not sneeze π
β¨ NAME β¨
scx_bpf_sub_kill_bstr β the icon, the moment: kill a direct child sub-scheduler. that's it, that's the vibe π«Ά
π¦ SYNOPSIS π¦
__bpf_kfunc s32 scx_bpf_sub_kill_bstr (u64 cgroup_id , char *fmt ,
unsigned long long *data , u32 data__sz , const struct bpf_prog_aux *aux
);
look at her. five args. absolutely serving signature energy β copy it exactly, no cap π
πΈ ARGUMENTS πΈ
cgroup_idβ the cgroup id of the direct child you're about to evict. like, the specific one. your fave. that one πfmtβ the reason message format string. yes bestie, you have to explain yourself πdataβ the format string parameters, all packaged up using the___bpf_fillmacro πdata__szβ data len, and it must end in__szfor the verifier. the verifier is that girl and she checks. periodt.auxβ the implicit BPF argument that gives access tobpf_prog_aux, hidden from BPF progs π iykyk
π DESCRIPTION π
so what does she do?? she evicts a direct child sub-scheduler, disabling it with the reason you supplied. the child and its whole subtree get torn down asynchronously through the usual disable path β like a group chat exit but with more kernel, ngl π§
now here's the part that's giving main character energy: unlike scx_bpf_exit, no exit code is taken</hotbink>. why? because the child is a separate scheduler with its own exit-code semantics, so a code chosen by the parent would have no defined meaning π the reason string is what carries the intent, so use your words, bestie π€
β οΈ returns0on success, or-ENODEVifcgroup_idnames no sub-scheduler. and like β that can totally race with the child detaching on its own, so it's not a scheduler error, don't panic π
π but if you name a sched that exists and is not a direct child? that aborts the parent. not cute. do not do that.
π SEE ALSO π
kernel file ./kernel/sched/ext/sub.c plus the whole friend group:
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_dispatch(9)scx_bpf_sub_grant(9)scx_bpf_sub_revoke(9)scx_bpf_sub_caps(9)
π aww okay that's the whole page bestie!! this lil cutie lives in ./kernel/sched/ext and the manual is dated October 2026 β mark your calendars, she's timeless β¨ slay, go read the source, mwah π
π¦ 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