scx_bpf_sub_kill_bstr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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_fill macro πŸŽ€
  • data__sz β€” data len, and it must end in __sz for the verifier. the verifier is that girl and she checks. periodt.
  • aux β€” the implicit BPF argument that gives access to bpf_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 🎀

⚠️ returns 0 on success, or -ENODEV if cgroup_id names 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:


πŸŽ€ 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