Skip to content

[None][fix] Handle skipped stale SWA blocks during cleanup - #16056

Closed
jiaganc wants to merge 1 commit into
NVIDIA:mainfrom
jiaganc:codex/fix-disagg-swa-stale-cleanup
Closed

[None][fix] Handle skipped stale SWA blocks during cleanup#16056
jiaganc wants to merge 1 commit into
NVIDIA:mainfrom
jiaganc:codex/fix-disagg-swa-stale-cleanup

Conversation

@jiaganc

@jiaganc jiaganc commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai summary

Description

Decoder-side disaggregated requests disable SWA scratch reuse before receiving remote KV data. Their stale out-of-window blocks can still have no allocated page, but cleanup assumed every missing page represented a scratch block and asserted that scratch reuse was enabled.

Treat missing stale pages as already released in both commit cleanup and stale-block unlocking. Existing type and cache sanity checks continue to validate allocated pages and the overall cache state.

Test Coverage

  • Ran the standalone real KV Cache Manager v2 reproducer on B200; it previously failed in _on_stop_committing() and now exits successfully.
  • python3 -m py_compile tensorrt_llm/runtime/kv_cache_manager_v2/_core/_kv_cache.py
  • Repository pre-commit hooks
  • git diff --check

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
@lfr-0531

lfr-0531 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Closing this PR since these changes are included in #15710

@lfr-0531 lfr-0531 closed this Jul 7, 2026
@jiaganc
jiaganc deleted the codex/fix-disagg-swa-stale-cleanup branch July 21, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants