Repository navigation
DM_PCORE=1 (opt-in, not yet measured): the busiest guest threads get a time-constraint declaration, to keep them on the performance cores - #1699
Closed
oliverames wants to merge 1 commit into
Conversation
oliverames
force-pushed
the
pcore-declare
branch
from
November 7, 2026 17:33
700a25a to
221cd11
Compare
oliverames
force-pushed
the
pcore-declare
branch
from
November 7, 2026 19:23
221cd11 to
8bead99
Compare
…declaration, to keep them on the performance cores Off by default and not yet shown to help: a Mario Kart World run on an iPhone left the performance cores about a minute in with thermal state nominal (mean clock 3.8 to 1.65 GHz, 55% to 12% of CPU time on performance cores). iOS has no core affinity; a time-constraint declaration is what the scheduler places on a fast core. The three busiest guest threads without one get a 60 Hz declaration of 1.5x their measured per-frame CPU, once each, from the CPU sampler's window.
oliverames
force-pushed
the
pcore-declare
branch
from
November 7, 2026 20:20
8bead99 to
cd7b852
Compare
2 of 4 tasks
Contributor
Author
|
Combined into #1713 with the other two pacing switches; same commit, same tests. Closing this one. |
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.
Not fully tested; opt-in. Filed so the change is reviewable while the measurement is open.
What and why
Mario Kart World 1.8.0 (#1383's build) on a physical iPhone runs at 60 fps for about a minute, then, in some runs, the process leaves the fast cores with thermal state nominal: mean clock 3.8 to 1.65 GHz and 55% to 12% of CPU time on performance cores, with the main thread's real-time declaration still in effect. cheemu21/plumber-racer-2 reports a slow state of the same kind on 1.0.0. iOS has no core affinity and every guest thread is already user-interactive, so the one lever left is a time-constraint declaration, which is what the scheduler places on a fast core and what the performance controller raises the clock for.
With
DM_PCORE=1, the three busiest guest threads without a declaration (60 ms/s or more in the CPU sampler's 300-frame window) get a 60 Hz declaration of 1.5 times their measured per-frame CPU (1 to 6 ms), once each (pcore_declareinhle_thread.c, log lineDM_PCORE: thread ... declared). The main and acquire threads keep their own declarations. Off by default: with the variable unset the code runs as before.Checked
hle_thread.ccompiles on this base with a generated profile header (clang syntax-only; this caught a missing<mach/mach_time.h>, now included);dm/tools/tests/test_docs.pypasses; the new switch is indocs/env_switches.tsvwith its meaning (env_switches.py --checkstill reportsDM_NVN_BC_ALIAS, which is missing from the table onmaintoo).6.00 / 4.96 / 2.37 msfor the three busiest threads).scripts/regress.py check --games: not run: off by default, so every game runs as before without the variable.Front ends
None: no front end has to act on this.
Docs
docs/development.mdand the switch indocs/env_switches.tsvdmsh_chain.py --headerwas run anddm/gfx/nvn/dmsh_chain.his part of the change. Not applicable: no chain tool changed.