Handle coredump dirs and cache hit updates (#30897)

Co-authored-by: Yongji Wu <30348494+libertyeagle@users.noreply.github.com>
This commit is contained in:
Lianmin Zheng
2026-07-12 00:37:43 -07:00
committed by GitHub
co-authored by Yongji Wu
parent f1c247edf9
commit 81d273f73b
3 changed files with 66 additions and 11 deletions
+3 -3
View File
@@ -2900,9 +2900,9 @@ class Scheduler(
# skip staging requests that are ongoing prefetch
continue
# Pop the number of tokens loaded from storage (L3 hits)
req.storage_hit_length = self.tree_cache.pop_prefetch_loaded_tokens(
req.rid
)
loaded_tokens = self.tree_cache.pop_prefetch_loaded_tokens(req.rid)
if loaded_tokens > 0:
req.storage_hit_length = loaded_tokens
req.init_next_round_input(self.tree_cache)
res = adder.add_one_req(
+20 -8
View File
@@ -6425,14 +6425,26 @@ class ServerArgs:
os.environ[key] = value
logger.info("Auto-set %s=%s (from --crash-dump-folder)", key, value)
if key == "CUDA_COREDUMP_FILE":
# cuda curedump cannot write to a folder that does not exist,
# so we have to create the folder first.
hostname = socket.gethostname()
os.makedirs(
os.path.join(self.crash_dump_folder, hostname),
exist_ok=True,
)
coredump_dir = os.path.dirname(
os.environ["CUDA_COREDUMP_FILE"].replace("%h", socket.gethostname())
)
if "%" in coredump_dir:
logger.warning(
"Cannot pre-create CUDA coredump directory %s: only %%h is "
"supported in the directory part of CUDA_COREDUMP_FILE; "
"coredumps may fail to write.",
coredump_dir,
)
elif coredump_dir:
try:
os.makedirs(coredump_dir, exist_ok=True)
except OSError as e:
logger.warning(
"Failed to create CUDA coredump directory %s: %s; "
"coredumps may fail to write.",
coredump_dir,
e,
)
def _handle_debug_utils(self):
if is_in_ci() and self.soft_watchdog_timeout is None: