Skip to content

[Scheduler] Charge the host-hit Mamba node slot in prefill admission - #43138

Closed
alphabetc1 wants to merge 1 commit into
sgl-project:mainfrom
alphabetc1:fix-mamba-host-hit-slot-charge
Closed

alphabetc1 wants to merge 1 commit into
sgl-project:mainfrom
alphabetc1:fix-mamba-host-hit-slot-charge

Conversation

@alphabetc1

@alphabetc1 alphabetc1 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

When a request's Mamba state hits on host (HiCache load-back, the external linker, LMCache), req.mamba_host_hit_length is 1 and the load-back fills two Mamba slots: the node's and the request's own. PrefillAdder charged only the request's slot, and budget_state only checks that at least one slot remains, so a host-hit request could be admitted with a single Mamba slot left.

Modifications

  • _mamba_gap_budget_for_req also charges the host-hit node slot. It is charged only while the request holds no state yet: a chunked continuation keeps its stale mamba_host_hit_length, but its hit was already loaded.
  • _update_prefill_budget debits rem_mamba_slots by the slots charged, not by a fixed 1.
  • add_one_req returns NO_TOKEN when the request needs more Mamba slots than remain.

Tests

No new test. On H200:

  • TestUnifiedHybridHiCacheBitExact (Inkling, Mamba host hits): kl_divs 0.0 x 9.
  • Unit tests (unit/mem_cache HiCache suites, unit/dllm/test_gemma4_uniform_lifecycle.py, unit/managers) match main. test_mm_process_config fails on main too. test_load_snapshot_backends::test_read_returns_latest failed once and passed on 3 reruns.

CI States

Latest PR Test (Base): ❌ Run #37814327945
Latest PR Test (Extra): ❌ Run #37814327530
Latest PR Test (AMD ROCm 10): ❌ Run #37814329306

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.

1 participant