sched: an overdue preempted prefill is failed only when waiting cannot help

On an idle engine the overdue path failed a preempted prefill on any refusal. A restore waiting a step
for a deferred release is a wait, and so is a refusal behind requests this step already admitted (the
budget or a card went to them); both clear by the next step. With preempted prompts published, the
restore path is common: under KV pressure two of ten preempted requests failed with "overdue
preempted prefill could not be admitted with nothing running", the debug log showing "the restore
waits a step for 1 deferred release(s)" right before. The path now fails only when nothing was
admitted this step and the refusal is not such a wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mici81andClaude Opus 5.5 authored and StillDeadcode committed 2026-11-05 14:59:28 +01:00
1 parent 01c7a3334a
commit 12b7b7889b
3 files changed
+62 -3

No files matched your search

+1
View File
@@ -525,6 +525,7 @@ private:
int64_t span_min_ = 0;
/* Set by admit_one when it held the admitted chunk back: what it would have taken. */
int64_t admit_full_ = 0;
bool admit_next_step_ = false; /* admit_one's refusal is a wait for the next step */
/* Whether this step's prefill may span (ChunkGeometry::span): set by step() for the step it
* plans, true only for a prefill alone in its step, and read by plan_chunk. True outside a
* step, so plan_chunk called directly answers for a span. */