Repository navigation
Conversation
Protect candidates already observed in the current offer before admitting new keys, so an offer larger than the tracker capacity cannot churn admission counts forever. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Cheng Rui <286040359@qq.com>
|
Reviewed this — the fix is correct and the failure it describes is real. I So with an offer wider than the tracker, every candidate really is evicted by a I also checked the invariant the new code depends on — that Nothing else from me — LGTM. |
|
/ci run |
|
✅ @positive666, CI is now available for this PR.
|
|
✅ Triggered Buildkite CI #86835 for commit |
…lm-project#54759) Signed-off-by: Cheng Rui <286040359@qq.com> Co-authored-by: Codex <noreply@openai.com>
…lm-project#54759) Signed-off-by: Cheng Rui <286040359@qq.com> Co-authored-by: Codex <noreply@openai.com>
Purpose
When one store offer contains more candidates than
max_tracker_size, the current per-key LRU updates can evict candidates from the same offer before the next observation. Withstore_threshold > 1, repeated identical offers then keep every count at 1 and CPU KV offload never starts.Change
The tracker remains bounded by
max_tracker_size, and processing remains linear in the number of offered keys.Value
This restores forward progress for valid CPU KV offload configurations. It is a liveness fix rather than a microbenchmark optimization: affected requests previously produced no CPU stores at all.
Validation
Serving A/B used Qwen3-0.6B in the default compiled/CUDA-graph mode with
store_threshold=2,max_tracker_size=3, and six candidates per offer:[13483, 25293]in baseline and fixed runs.Duplicate-work check
#52227 moved reuse counting from lookup to store offers, but retained sequential per-key insertion and does not prevent churn within an oversized offer. Searches for
store_threshold max_tracker_size,KV offload tracker progress, andoversized offerfound no open PR implementing this fix. Open PRs #52103 and #53087 address event provenance andHIT_PENDINGtimeouts respectively.AI assistance
AI assistance was used for fix bug. The submitter reviewed every changed line and the validation results.