launcher: wake the live shader worker for a request while jobs run #283
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/283"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-26T23:04:32Z.
Problem
While any job is running, the live shader worker waits on its futures with a 50 ms timeout and doesn't listen for the request directory's notification. A request published beside a running compile waits for the next rescan: about 50 ms at the median. An idle worker already wakes on the notification in 2-3 ms. Raised in Discussion #229.
Change
A finished job writes to a pipe that the notification wait polls together with the inotify descriptor. One wait now serves both, and the worker uses it whether or not jobs are running. Without inotify, the worker waits on its futures with the 50 ms rescan, as before. No compiler flags, cache identities, worker counts or request order change.
Measured
Host worker only: four workers, real xshader, DXC and dxv, no guest and no GPU. 30 quick recorded ProjectScarlett requests, with their DXIL already stored, were published one at a time beside one long compute compile that was still running at the end. Three runs each, median reply time:
This is the latency of one host worker request. It is not a frame-time or load-time measurement, and I haven't measured how often a title publishes a request beside a running compile.
Tests
tests/test_runtime_shader_workers.py: a request published 10 ms after a blocked job starts must start within 20 ms. It takes 35 ms on main, so it fails there 3 times out of 3, and it passes 30 times out of 30 with the change. It runs throughservewith real directory notifications.Checks (on
e76ff6a)python -m unittest discover -s tests -q: OK.python tuxbox.py check --adapter 1002:13c0 --proton … --prefix … --windows-dxc …passed, 120 gates. An earlier run on the previous base failedlanes-selftest-compute-frameonce, while a game compile was loading the machine. It passed in 3 of 3 reruns on this branch, and in 3 of 3 on main, so I count it as load, not this change.Note: #240 edits the same loop. It keeps the 50 ms wait, so the two are independent, but whichever merges second needs a small rebase.
🤖 Generated with Claude Code