scx_bpf_sub_revoke(9)
π scx_bpf_sub_revoke β a Kernel API Manual moment (section 9, bestie, we're in the deep kernel lore now) β¨
okay so picture this: you're in the scx_bpf_sub_revoke(9) page of the Kernel API Manual, and honestly? it's giving "one tiny function with main character energy." let's get into it π
πΈ NAME πΈ
scx_bpf_sub_revoke β the little icon whose whole job is to revoke @caps on a cmask's cids from a direct child. that's it, that's the vibe. no cap. π
β¨ SYNOPSIS β¨
__bpf_kfunc void scx_bpf_sub_revoke (u64 cgroup_id , u64 caps , const
struct scx_cmask *cmask__arena , const struct bpf_prog_aux *aux );
literally copy it exactly bestie, spacing and all, the kernel does not do "close enough" π
π¦ ARGUMENTS π¦
cgroup_idβ the cgroup id of the direct child sub-sched. like, which child we're talking to πcapsβ a bitmask ofSCX_CAP_*to revoke. the actual list of things getting taken away π«Άcmask__arenaβ the cid cmask to revoke caps on. this is the target, the main character of the operation πauxβ implicit BPF argument. it just shows up, no invite needed π
π₯ DESCRIPTION π₯
so what does it do? it clears caps bits on cmask__arena from the child named by cgroup_id and all its descendants. the whole subtree, every last one, no crumbs left π
and here's the part that's highkey iconic: the origin parent's pshard lock is held across the subtree walk, so a concurrent grant from the origin parent observes the revoked state. the way that locking is doing its job? obsessed. πβ¨
π SEE ALSO π
the kernel file lives at ./kernel/sched/ext/sub.c, and the friend group is large, so buckle up bestie:
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_caps(9), scx_bpf_sub_kill_bstr(9)
β friendly reminder: every single flag, argument, and name above is literal. don't "fix" the spelling of cmask__arena β those double underscores are load-bearing π
and that's the page!! huge shoutout to ./kernel/sched/ext for the source (version vibes courtesy of October 2026), signed off with love from your favorite kernel-fluent bestie β stay slaying, stay locked, and remember: revoke responsibly π§ππ
π¦ 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