Repository navigation
Frame workgroup: the threads that make a frame join an os_workgroup interval (opt-in Deadline boost; Xipzer's) - #2495
Open
oliverames wants to merge 4 commits into
Open
oliverames wants to merge 4 commits into
oliverames wants to merge 4 commits into
Conversation
…nterval with the present period as deadline The acquiring thread marks each frame as an interval (AudioWorkIntervalCreate, looked up at run time); the encode thread and every thread that records command buffers join it; a guest thread leaves it at exit (hle_thread.c). An iPad Pro M4 ran BotW mostly on efficiency cores while playing (14-55% of its CPU time on performance cores), translation 60-70% slower, frames dropped, at thermal state 0. On the Mac the translation thread's CPU time per frame fell 5.7 -> 2.8 ms (same cycles, higher clock). DM_FRAME_WG=0 turns it off. Discord: https://discord.com/channels/1491224015434678394/1524915513606803549 (cherry picked from commit 1873ca4) (cherry picked from commit d4cf31c)
…ine boost) iPad Pro M4, BotW at 120%, camera turning, thermal state 0, runs alternated on / off / on / off: with it the translation thread ran at 3.8 GHz (3.3 ms a frame against 4.75 ms at 2.6 GHz) for 27% more CPU power (1.94 against 1.52 W), no dropped frames either way. The efficiency-core episodes it is meant for came in play, which the player tests with the toggle. Discord: https://discord.com/channels/1491224015434678394/1524915513606803549 (cherry picked from commit 90276c0) (cherry picked from commit df05416)
…out HookLink's name
The reference entry in frame-rate.md ("The frame's threads run on efficiency cores while the device is cool") and the symptom index. The Deadline boost description in settings.tsv came through HookLink's copy of these commits with "Experimental in HookLink"; it now reads "Experimental" and says device, not phone.
Checked: host build (GAME=0400486024DEC000), iOS compile check 263 files, 0 failed; test_launcher_settings, test_env_switches, test_docs pass; clang-tidy nothing over the baseline in hle_nvn.c and hle_thread.c. Not run in a game here.
oliverames
marked this pull request as ready for review
November 12, 2026 18:45
Contributor
|
Thanks for opening this and for keeping the authorship, and for the docs. Happy for it to go in from here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
These are @Xipzer's two commits, opened here with their authorship kept, plus one commit of docs from me. Xipzer, if you'd rather open this yourself or change anything, say so and I'll close this one.
The time-constraint policy covers one thread, the one that acquires the window. The performance controller doesn't know that the encode thread and the threads that record command buffers work to the same deadline. On an iPad Pro M4, Breath of the Wild ran mostly on efficiency cores while playing (14–55 % of its CPU time on performance cores), with the translation thread 60–70 % slower and frames dropped, at thermal state 0.
With
DM_FRAME_WG=1(the launcher's Performance › Deadline boost), the acquiring thread, the encode thread and every thread that records command buffers join oneos_workgroupinterval made withAudioWorkIntervalCreate(looked up at run time). Each frame is an interval whose deadline is the present period. A guest thread leaves the workgroup when it exits (hle_thread.c), since a thread still joined at exit crashes in libdispatch. It's off by default: Xipzer measured it holding the translation thread at 3.8 GHz (3.3 ms a frame against 4.75 ms at 2.6 GHz) for 27 % more CPU power, with no dropped frames either way in that test. Whether it keeps a game off the efficiency cores in real play is what the toggle is for.How it got here: Xipzer's commits 1873ca4 and 90276c0 were carried in HookLink's engine (the
hooklinkbranch of dsi-hub/nxnative, which ships it as Deadline boost from 1.8.5). I cherry-picked those copies onto main. The only changes are mine, in the third commit: the launcher description said "Experimental in HookLink" and now says "Experimental", plus a reference entry and the symptom index.Related: #1573 (Xipzer's iPad Pro M4 findings), #2484 (the presenting thread's own time-constraint deadline).
Checked
0c078130fmerged in on 2026-11-12 (a merge, not a rebase). On that tree I ran again the host build, the iOS compile check (263 files, 0 failed),test_env_switches.py,test_docs.py,test_launcher_settings.pyandtest_patches.py, andlint_c.py tidyon the changed C files (nothing over the baseline); all pass. Upstream CI is queued behind a long backlog.make -C dm/host GAME=0400486024DEC000builds;GAME=0400486024DEC000 python3 dm/ios/tools/compile_check.pyreports 263 files, 0 failed;test_launcher_settings.py,test_env_switches.pyandtest_docs.pypass;lint_c.py tidyhas nothing over the baseline inhle_nvn.candhle_thread.c.Docs
docs/reference/frame-rate.md, andpython3 dm/tools/docs_symptoms.pywas rundocs/env_switches.tsvhas a row forDM_FRAME_WG;dm/games/settings.tsvhas the launcher row.