scx_resolve_local_dsq(9)
π scx_resolve_local_dsq β Kernel API Manual, bestie edition β¨
okay so real talk, we're in the Kernel API Manual today and the main character is scx_resolve_local_dsq(9). she's that girl who decides where a task actually goes when you try to insert it. no cap, she's the vibe check at the door. π
β¨ NAME β¨
scx_resolve_local_dsq β pick the local, rescue or reject DSQ for an insert. literally her whole job, and she ate. π
π¦ SYNOPSIS π¦
struct scx_dispatch_q * scx_resolve_local_dsq (struct scx_sched *sch ,
struct rq *rq , struct task_struct *p , u64 *enq_flags );
πΈ ARGUMENTS πΈ
schβ the enqueuing sub-sched. the one doing the enqueueing, iykyk.rqβ the rq whose local DSQpis targeting. this is the destination energy.pβ the task being inserted. her moment to shine π«Άenq_flagsβ in/out, bestie. the unhonored flags get cleared on the way out. π
π DESCRIPTION π
so here's the tea. if sch holds the required caps on rq's cid, you get rq's local DSQ back. simple, iconic, no drama.
otherwise? she's not just gonna dump you nowhere:
- return
rq's rescue DSQ if the insert carriesSCX_ENQ_RESCUEand rescue is enabled β cute little safety net β¨ - or return
rq's reject DSQ after recording the reenq reason onpβ not the ending you wanted but she's being honest about it π
and the flag cleanup, because nobody likes leftover flags:
SCX_ENQ_IMMED,SCX_ENQ_PREEMPTandSCX_ENQ_HEADare all cleared when diverting to rescue or reject.SCX_ENQ_PREEMPTis also cleared on a fallback migration-disabled admission.
as for bypass, it doesn't need any special-casing β literally none, periodt. a bypassing sched's tasks are enqueued to and run by its nearest non-bypassing ancestor. and if root is bypassing, it always holds all caps. always. π
π₯ 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)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)scx_bpf_sub_kill_bstr(9)
ngl, that's a lot of friends. she's popular. πβ
okay bestie that's the whole page, you're welcome π this one comes from ./kernel/sched/ext, dated October 2026 β and it's filed under scx_resolve_local_dsq(9) if you ever need to find her again. 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