scx_rescue_keep(9)
π 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β therqthatpis 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
scx_skip_subtree_pre(9)scx_next_descendant_pre(9)scx_rescue_charge(9)scx_rescue_end(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_revoke(9)scx_bpf_sub_caps(9)scx_bpf_sub_kill_bstr(9)
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
- 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