jitv2: one branch in step_jit's scheduling path; drop the hot lane - #149
Closed
atomchild411 wants to merge 1 commit into
Closed
atomchild411 wants to merge 1 commit into
atomchild411 wants to merge 1 commit into
Conversation
A page whose compile request was already queued took a second branch on every arrival: count the arrival, and past 256 put a copy of the request on a hot lane the workers drained first. It was built for the first program after boot on a machine with few compile threads, waiting behind a long queue. With more threads it buys nothing, and it put an atomic add on the interpreted path of every page waiting for its compile. Now scheduling is one test: if this arrival wins `try_schedule_page`, push the request (and clear the flag if the queue is full); either way, interpret. HOT_QUEUE, push_hot_request, note_waiting_arrival, the page's hot_wait and promoted fields and their resets, and the worker's hot-first pop are gone. Measured on an Indy (R4400, IRIX 6.5.22, lightning,rex-jit,jitv2, 4 compile threads), best of six runs: whetstone 100000 6.233 s with the hot lane, 6.310 s without; dhrystone 10000000 8.803 s with, 8.775 s without -- the same within noise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
ok i found the problem that caused regression, defaulting to r5k in iris.toml. which is slower. |
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.
As discussed: one branch in
step_jit's scheduling path instead of two.A page whose compile request was already queued took a second branch on
every arrival: count the arrival, and past 256 put a copy of the request on
a hot lane the workers drained first. It was built for the first program
after boot on a machine with few compile threads, waiting behind a long
queue. With more threads it buys nothing, and it put an atomic add on the
interpreted path of every page waiting for its compile.
Now scheduling is one test: if this arrival wins
try_schedule_page, pushthe request (and clear the flag if the queue is full); either way,
interpret.
HOT_QUEUE,push_hot_request,note_waiting_arrival, thepage's
hot_wait/promotedfields and their resets, and the worker'shot-first pop are gone (1 line added, 67 removed).
Testing
cargo test --lib --features jitv2: 1116 passed, 0 failed, on currentmain (95b7ad0).
lightning,rex-jit,jitv2, 4 compile threads),best of six runs of your bench binaries: whetstone 100000 6.233 s with
the hot lane, 6.310 s without; dhrystone 10000000 8.803 s with, 8.775 s
without. The same within noise on this host (M4 Pro, 16 KB pages); your
Threadripper with 16 threads is the more interesting measurement.
🤖 Generated with Claude Code