[Fix] Unify pinned host pool release on graceful shutdown (#32029)

This commit is contained in:
Liangsheng Yin
2026-07-22 12:29:34 -07:00
committed by GitHub
parent f5dcbe8f14
commit 5c6a29b3c3
7 changed files with 29 additions and 5 deletions
+3 -5
View File
@@ -1465,11 +1465,9 @@ class Scheduler(
# HostKVCache.destroy. Called from run_scheduler_process's finally.
if self.hisparse_coordinator is not None:
self.hisparse_coordinator.destroy()
# A plain HiRadixCache (no hisparse) also holds a large pinned host KV
# pool; unregister it here too, else the kernel unpins it during reclaim.
host_pool = getattr(self.tree_cache, "token_to_kv_pool_host", None)
if host_pool is not None:
host_pool.destroy()
self.tree_cache.release_host_resources()
if self.decode_offload_manager is not None:
self.decode_offload_manager.release_host_resources()
def run_event_loop(self) -> None:
"""Run the scheduler's event loop.