fix(m0): never leave a process paused when a resume fails under the GPU cap

A resume that failed was only counted, and the process stayed suspended
after the cap ended. DutyCap now keeps what it still owes per process,
does not stack another suspend on it, retries the resume every period
and at the end, treats a raising call as a failure, and reports any
process it could not resume as left_paused (an error for the row).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-10 23:56:57 +09:00
parent d0938c10f9
commit ba662ae199
3 changed files with 107 additions and 9 deletions

View File

@@ -514,9 +514,13 @@ def measure_levels(r: StageResult, s: Strata, preset: dict, context: int, levels
row["gpu_util"] = util.summary(cap)
if cap:
row["gpu_cap"] = duty.summary()
if row["gpu_cap"]["failed_processes"]:
if row["gpu_cap"]["left_paused"]:
r.error(f"level {lv['key']} gpu cap",
f"{row['gpu_cap']['failed_processes']} process(es) could not be paused")
f"{row['gpu_cap']['left_paused']} process(es) are still paused")
elif row["gpu_cap"]["failed_processes"]:
r.error(f"level {lv['key']} gpu cap",
f"{row['gpu_cap']['failed_processes']} process(es) could not be "
"paused or resumed at once")
for err in row["errors"]:
r.error(f"level {lv['key']}", err)
except Exception as e: