feat(m0): measure the game's own frame times and try yielding by priority instead of a GPU cap

The 95 % GPU cap is gone: it did not lower utilisation, slowed the LLM and
a YouTube video did not stutter without it. What it was meant to protect
is now measured directly in a game. The new on-demand game_frames stage
records the game's frame times with PresentMon (pinned by hash, game
process only, CSV deleted after reading) with Jarvis off, idle and busy in
the game placement, and busy while Jarvis yields: its processes at
below-normal CPU and GPU scheduling priority, read back to confirm, then
restored. Busy rows run A B B A. The design docs record the candidate and
the pre-registered rule for adopting it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-11 09:05:55 +09:00
parent 726fca3377
commit dff18c5c7e
9 changed files with 717 additions and 11 deletions

View File

@@ -55,14 +55,18 @@ STAGES = [
# the cap is off by default until this shows it helps). Opens YouTube, so only when asked for.
("video_drops", "영상 끊김: Jarvis를 돌리는 동안 유튜브 영상의 끊긴 프레임", "base", "llm.py",
["model=fast", "only=video"], 0),
# Does Jarvis make the user's game drop frames, and does yielding by priority help (the cap is gone,
# 2026-11-11). Needs the user's game and administrator rights (event tracing), so only when asked for.
("game_frames", "게임 프레임: Jarvis를 돌리는 동안 게임 화면의 프레임 (직접 게임을 켜 주셔야 합니다)", "base", "llm.py",
["model=fast", "only=frames"], 0),
# With the user's game running. Needs someone at the PC, so only when asked for (--only).
("gamemode_live", "게임을 켠 상태로 재기 (직접 게임을 켜 주셔야 합니다)", "base", "llm.py",
["model=fast", "only=live"], 0),
]
# Stages left out of a full run: they need the user there after the unattended part, or open a website.
ON_DEMAND = {"gamemode_live", "video_drops"}
ON_DEMAND = {"gamemode_live", "video_drops", "game_frames"}
# Stages that start the STT worker next to the LLM and need the stt venv's Python.
NEEDS_STT = {"gamemode_stt", "gamemode_tune", "gamemode_live", "video_drops"}
NEEDS_STT = {"gamemode_stt", "gamemode_tune", "gamemode_live", "video_drops", "game_frames"}
def free_gb(path: Path) -> float: