[mem_cache] Share one ReqKvInfo between a streaming session slot and its request (#37108)

This commit is contained in:
Liangsheng Yin
2026-08-30 16:36:48 -07:00
committed by GitHub
parent 4bea51d885
commit 4bb8de34cc
4 changed files with 35 additions and 47 deletions
@@ -105,15 +105,14 @@ _OWNER_SITES = {
"kv_allocated_len",
): 1,
# streaming session tail trimming
(_SS, "StreamingSession._free_tail", "kv_committed_len"): 2,
(_SS, "StreamingSession._free_tail", "kv_allocated_len"): 2,
(_SS, "StreamingSession._free_tail", "kv_committed_len"): 1,
(_SS, "StreamingSession._free_tail", "kv_allocated_len"): 1,
(_SS, "StreamingSession._trim_overshoot", "kv_committed_len"): 1,
(_SS, "StreamingSession._trim_overshoot", "kv_allocated_len"): 1,
(_SS, "StreamingSession.try_cache_finished_req", "kv_allocated_len"): 1,
# Inherit the authoritative finished length (not the lagging req clock).
(_SS, "StreamingSession.try_cache_finished_req", "kv_committed_len"): 1,
# NPU page-boundary clamp on req and slot clocks.
(_SS, "StreamingSession.try_match_prefix", "kv_committed_len"): 2,
# NPU page-boundary clamp on the shared req/slot clock.
(_SS, "StreamingSession.try_match_prefix", "kv_committed_len"): 1,
}