VICTORY_MWAITX_SLEEP=1 on Intel hybrid: exceptions go to 0, frame time does not improve #1062
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#1062
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Hugo373 on GitHub · 2026-11-25 18:03 UTC · original
VICTORY_MWAITX_SLEEP=1on Intel hybrid: the exceptions go, the frame does not improveSummary
On a Core Ultra 7 255HX, PR #1029's switches do what they claim mechanically —
monitorx/mwaitxemulated exceptions fall from a peak of 298,753/s to 0 — but frame timedoes not improve. Draw-matched over settled frames the difference is within noise, and it is
not faster.
Machine
ca8829fEvery other report on this scene is on AMD. This may be why nobody has hit it.
The exceptions
From the per-frame
console CPU instructionsline,monitorxper second:226 samples without; not one non-zero sample with.
The frame
Settled world frames only, draw-matched to a common window, both runs in the same scene:
+3.8 % — slightly slower, inside run-to-run variation.
Components, same window:
The freed thread is not the constraint here:
on GPUis ~100 ms of a ~290 ms frame andpreparingdoes not move at all.Reading
The switch replaces a spin on a fence value with a sleep. On this part the spin was not costing
anything measurable, and the sleep's wake-up latency is of the same order as what it saves. On
a hybrid P/E part there may also be a cost to waking on the wrong core class.
If the intent is to help Intel hosts, the exception count is what it fixes and that is worth
having — but it should not be presented as a frame-rate win for them.
Caveats
control. Comparisons on raw means were off by a factor of two and are not trusted here.
only that the exceptions it targets are gone.
Reproduction
Reach the world, stand still, and compare two runs differing only in
VICTORY_MWAITX_SLEEP/VICTORY_MWAITX_PATCH. Readmonitorxfrom theconsole CPU instructionsline, and frame timefrom the
fps, ms/frameline againstdraws/frame.@alexis27yt on GitHub · 2026-11-25 19:03 UTC · original
Author of #1029 here. You're right on the main point, and the PR text already says the frame-rate effect is unmeasured. It was never meant as a frame-rate claim. On a 20-core part where ~100 ms of a ~290 ms frame is on the GPU and preparing doesn't move, one freed hardware thread isn't the constraint (fxceless saw the same on a 14700KF). The 99.7 % → 0.3 % figure is from the synthetic loop test, not from the game, as the PR says.
One thing in the data, though: 0 exceptions is what
VICTORY_MWAITX_PATCH=1gives, notVICTORY_MWAITX_SLEEP=1.monitorx+ onemwaitxexception (the 1 ms wake-ups during a long wait), so the line should show a few hundred a second. That matches Proudnoob4's SLEEP run above: 191-217/s, with "mwaitx slept: woken 16-17, timed out 45-49".pause: the hardware thread stays ~98 % busy, it just stops paying Windows' exception dispatch. When both are set, PATCH wins.So "with the switches" most likely measured PATCH, the mode that does not free the thread. If you get the chance, a run with only
VICTORY_MWAITX_SLEEP=1would tell whether freeing the thread changes anything on this part. On a GPU-bound 20-core laptop I wouldn't expect much either way; the case where it could matter is a part with few cores and no E-cores (e.g. 6C/12T), which nobody has measured in game yet.Agreed it shouldn't be read as a frame-rate win for Intel hosts unless a run shows one.
@Hugo373 on GitHub · 2026-11-25 19:14 UTC · original
Follow-up with the corrected measurement — you're right, my first run set both and measured PATCH.
What I got wrong
The run I reported set
VICTORY_MWAITX_SLEEP=1andVICTORY_MWAITX_PATCH=1. So the 0 exceptions was PATCH, and PATCH is the mode that keeps the thread spinning. The +3.8 % I quoted was the cost of stopping exception dispatch, not of freeing a thread. Withdrawn.SLEEP alone
monitorx/mwaitxper second, from the per-frameconsole CPU instructionsline:24 samples. That is the "few hundred a second" you predicted, and it is what Proudnoob4's run shows too. So the switch is doing the thread-freeing thing.
For contrast, same machine: PATCH gave a flat 0, and neither gave 59,163–298,753.
Frame time — and why I am not confident in it
Draw-matched over settled world frames, 19 frames each:
I do not trust that number. The two runs are in different scenes — draw ranges 2,008–7,476 against 834–5,027, frame times 202–784 ms against 190–1,669 ms. The window I matched on is wide enough to hide a scene change, and I have been wrong about exactly this twice today: comparing two runs that stood in different places and reading the difference as a configuration effect. One of those errors is why my first report here was wrong.
So the honest answer to your question is: on this part, freeing the thread does not obviously help, and I cannot show it hurts either. Which is what you expected for a GPU-bound 20-core hybrid.
What would settle it
Two runs in the same scene, camera at rest, alternating — your A-B-A-B shape rather than my two separate runs. I can do that if it's worth the time; if you think a 6C/12T part is the only case where it matters, say so and I will leave it here rather than spend runs on a part that cannot show the effect.
Machine, for the record
Core Ultra 7 255HX (20C/20T hybrid), RTX 5080 Laptop, 31.4 GB, Windows 11 26300, tree
ca8829f+ #868. Gameplay frames at ~3,700–3,900 draws;on GPU~36–56 ms of a ~350–500 ms frame, so it is not GPU-bound at the frame level the way the README's 4070 numbers are.@alexis27yt on GitHub · 2026-11-25 19:22 UTC · original
I'd leave it here. Your SLEEP-only numbers (61 / 135 / 433 per second) show the switch does what it should mechanically, which is what this issue needed to settle. On a 20-thread hybrid, one freed hardware thread is unlikely to show in the frame whatever the run shape, so A-B-A-B runs there would spend time on a part that can't show the effect. And noted on your last line: at 36-56 ms on the GPU of a 350-500 ms frame, it's the CPU side, but with plenty of threads to spare.
The case that could show it is a 6C/12T part with no E-cores. I have one (i5-12400F), but I can't measure it in game: everything I've done so far is synthetic tests against the runtime, without the title's executable or its base files, so I can't run the game itself. That run will have to come from someone who has both on a part like that.
Until then, #1029 stands as an exception-count fix for Intel hosts, not a frame-rate one.