Repository navigation
Conversation
…y used, and the warm frame passes four of them through their slow first recordings
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
… after the first frame's, not 60-90
|
Head moved to 66c3bfe: warm_window orders the start-up warm-up (layer-pipeline step empty until FRAME-PERF fills it). PROOF-FARM: please test this head. |
|
Windows whole suite ( |
…eaves the pool, warm frames finished before submitting, and a regenerate mode for the wgpu-hal patch
|
Head moved to 5e741b1 for the review's fixes (notes/review-1082.md): the empty layer-pipeline step is removed; allocators are classed by what a cycle recorded, with the label only as a first guess; a failed allocator reset leaves the pool; warm frames are finished before any is submitted (three distinct allocators by construction); 8 spare passes per warm frame (first tab switch 5,440 -> 370 us of list/allocator calls); scripts/vendor-wgpu-hal.sh --regenerate. PROOF-FARM: please test this head. |
… tab switch's lists" This reverts commit 5e741b1.
|
Windows whole suite ( |
…e, and the patch regenerates only against the vendored version with git's diff options pinned and the vendored bytes kept as committed
|
Head moved to 6482ec4 (review re-read, notes/review-1082.md): the eight spare passes are reverted (f691727) and come back as their own PR on idle turns after the hand-over; a take falls back across classes before a new allocator is made (no allocator stranded if labels are ever dropped; Rune's instance flags never include DISCARD_HAL_LABELS, built without with_env()); the regenerate mode checks the version against vendor/wgpu-hal/Cargo.toml, pins git's diff options, and .gitattributes keeps vendor/wgpu-hal/** and *.patch byte-exact (-text: the published crate has one CRLF file). PROOF-FARM: please test this head. |
… frame may take theirs before making one
|
Windows whole suite ( |
…ns git without the user's or system's config
|
Head moved to 4e9a237 (third read, notes/review-1082.md): the fall-back is one way (a frame may take a pending-writes allocator; pending writes stay in their class and make a new one); patch regenerated; the regenerate script refuses converted line endings and runs git without user/system config. PROOF-FARM: please test this head. |
|
Windows whole suite ( |
Closed, 19 Nov 2026: not merged
Decision: closed by the orchestrator at 00:33. Rune #1140 (pinned pipelines, merged in
78efd4a7) stands.Why: the pass line was set before the results: a hand-over no later than
dev's at two and four P-cores, no slower key, and a saving over the first three GPU frames of at least one 240 Hz refresh (4,167 µs). No arm met all three.devmeets after the hand-over.The four arms were shipping builds (
release: fat LTO + PGO trained at5877e042). Each is rune-desktopef07741awith only the Rune pin moved, built withbun harness/measure-exe.ts <sha> --profile release:ef07741a78efd4a75071fd7a78efd4a7+4e9a23735c0cf253ff8123a0=78efd4a7+439dff53dev's single warm framec51ee6e8e51e582a=78efd4a7+560b6be2Hand-over, ms from process start, p50 [range], ten tabs, the app pinned to P-cores:
The first three GPU frames after the hand-over, unpinned, wall µs, median of 8 (first / second / third):
Ten-tabs key posted at +0, two P-cores, µs p50 [range]: base 5,452.9 [4,511.4-7,157.2], #1082 5,313.5 [4,512.4-5,761.5], 1x2 5,159.9 [4,655.7-5,623.3], pool only 4,755.5 [4,601.3-5,865.9]. None is slower, and no arm missed at either core count (limit: the arm's own median + 4,167 µs).
Dirt:
Not proved:
dxcap -forcetdrresets the driver for every program on the machine, so it is never run on the owner's machines. TheRemoveDevicemeasuring build was not run.Proofs:
proof\ib-3\four-takes-ef07,four-aff2-ef07,four-aff4-ef07(this ticket);proof\ib-3\ship-takes-ef07,ship-aff4swap-ef07(the earlier shipping ticket);proof\ib-3\allocator-opens(the per-list cost). Analysis:notes\ib-3-status.mdin the operation-detox workspace.The first two GPU frames after the Windows CPU-to-GPU hand-over cost 7-17 ms instead of 1.6-2.0 ms. The cost is in D3D12 command allocators, not back buffers: an allocator's first two cycles at a given number of lists cost about 0.5 ms a list on an Iris Xe, later ones about 20 µs.
Change
vendor/wgpu-haldx12: aCommandEncodertakes an allocator (with its lists) fromDeviceShared::allocatorsas it begins and gives it back inreset_all. Frames get the free one that has recorded the most. wgpu'sPendingWritesencoder keeps its own class and never takes a frame's allocator; a frame may take a pending-writes one before a new one is made. An allocator's class is set by what its cycle recorded.vendor/wgpu-hal.patchregenerated against wgpu-hal 30.0.1 (it reproducesvendor/wgpu-hal/src).window/cpu_frame.rswarm_frame: records the window's frame on 3 encoders at once, 2 rounds, plus one empty pass. A render pass is two lists in wgpu-core 30, so a warm frame has one list more than a window's frame; an allocator is past its slow cycles for as many lists as it has had (measured: 8 extra empty passes took a first tab switch's list/allocator calls from 5,440 to 370 µs; those passes are not in this PR). Each round's frames are finished before any is submitted, so a round warms three different allocators. A frame may take a pending-writes allocator before making one; pending writes never take a frame's.Why
Each command-list open, with its allocator, on Home (
proof/ib-3/allocator-opens, Iris):CreateCommandList)Reset)wgpu-core keeps one allocator per encoder in a LIFO pool, and its pending-writes encoder swaps through the same pool, so frames 0-9 meet three new frame allocators, each slow twice. 2 vs 3 swap-chain buffers made no difference.
Results
At this head's code, 3 encoders x 2 cycles. "After" is a release-quick OpenCode build of Rune
73cba479:34127a27(this head's code;4e9a2373adds only the regenerate script's checks and the changelog) plus a stderr log of allocator takes. Exe9EB1A7CD11C2, rune-desktopb22a2521repinned. "Before" is release-quick rune-desktopb22a2521(Rune0796df5f), exe13A5D6A3687B. Release-quick builds, not the shipping build (fat LTO + PGO). Iris Xe, 1280x800, whole-window redraws, n=8 launches per build and profile (n=7 where a launch moved before frame 12). Wall µs, median. The warm rows are each profile's floor: what a frame costs there once nothing is cold."Before" comes from an earlier ticket (
proof/ib-3/allocator-pool-redraw, same exe). "After" comes from the ticket that also ran3bf0d749and6482ec4e(proof/ib-3/takes).Allocator takes in the first second after the hand-over (median per launch, every profile):
3bf0d749and this head: pending writes make one new allocator; frames make none.6482ec4e(two-way fall-back, superseded): pending writes took a warmed frame allocator once, and a frame then made a cold one once. That's why the fall-back is one way here.Memory: memprobe 12.5 s after launch, Home, release-quick, n=3 per cell except the RTX after (n=2: the capture loop ended after three windows),
proof/ib-3/head-4e9a-footprint. Each warmed allocator keeps its lists, about a dozen, for the device's life.macOS, Linux and the web don't run this code (
cpu_frame.rsand the dx12 backend are Windows-only).Key cells at
66c3bfe5(3 encoders x 2 cycles, the same warm-up as this head), release-quick, not the shipping gate. Click and key posted together at +0/+100/+200 ms after uncloak, n=10 a cell, both builds alternating in the same quiet windows. Key handled, µs: median / max / misses over the build's rest + 4,167.Misses across the nine cells: 6 before, 4 after. Hand-over: 138-171 ms after the first present before, 180-210 ms after.
What the later hand-over costs a user
The hand-over comes about 40 ms later at 3 x 2 (138-171 → 180-210 ms after the first present). Until then, the CPU painter draws the window: