Commit b8c9f40
Fix reversed FCFS priority in PagedAttentionScheduler preemption
sort_running_by_priority_fcfs sorted self.running ascending by timestamp
(oldest first) and then reversed it to newest first. The decode loop then
schedules with pop_front and preempts under KV-cache pressure with
pop_back, so the reverse made the oldest (highest priority) sequences get
preempted first and the newest scheduled first, the opposite of FCFS and
of the function's own name.
Drop the reverse so running stays oldest-first: pop_front schedules the
oldest sequence first and pop_back preempts the newest (lowest priority)
first. This matches DefaultScheduler, which sorts ascending without
reversing.1 parent ea2a5eb commit b8c9f40
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | 592 | | |
594 | 593 | | |
595 | 594 | | |
| |||
0 commit comments