scx_resolve_local_dsq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 DSQ p is 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 carries SCX_ENQ_RESCUE and rescue is enabled β€” cute little safety net ✨
  • or return rq's reject DSQ after recording the reenq reason on p β€” 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_PREEMPT and SCX_ENQ_HEAD are all cleared when diverting to rescue or reject.
  • SCX_ENQ_PREEMPT is 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:


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