scx_rescue_keep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

scx_rescue_keep β€” from the Kernel API Manual β€” is literally here to keep the rescue going for a preempted-out rescuee. Bestie, it's the β€œwait, don’t end the rescue yet” vibe check. 🫢


✨ SYNOPSIS ✨

bool scx_rescue_keep (struct rq *rq , struct task_struct *p );

πŸŽ€ ARGUMENTS πŸŽ€

  • rq β€” the rq that p is running on.
  • p β€” the task under rescue whose slice is exhausted. 😭

🌸 DESCRIPTION 🌸

okay so picture this: this function gets called from put_prev_task_scx, and its whole job is deciding what an exhausted slice means for the rescuee. πŸ‘‘

scx_rescue_charge ends the rescue the moment the admitted slice is fully served. So if we arrive here and the rescue is still open? That means p was preempted. Not me being dramatic, that’s just the read. πŸ’…

In that case, restore the unserved remainder and return true β€” p stays the rescuee, and the caller reinserts it at the tail of the local DSQ, behind whatever preempted the rescuee. Yes, behind. Queue etiquette. πŸŽ€

Return false to end the rescue instead: the slice is already fully served, p is leaving the rq, or bypass is dismantling rescues. That’s the β€œrescue over, bestie” path. πŸ¦‹

no cap: true = keep the rescue rolling; false = end it. The details above are the whole vibe check. πŸ’–

πŸ”— SEE ALSO πŸ”—

Kernel file: ./kernel/sched/ext/sub.c


source/version: ./kernel/sched/ext Β· date: October 2026 Β· page: scx_rescue_keep(9) β€” mwah, bestie, go keep those rescues cute and correct πŸ’‹βœ¨

πŸ“¦ where this page comes from