scx_bpf_sub_revoke(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of SCX_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