Skip to content

jitv2: in sync mode, recompile a page with code only when it goes hot - #745

Draft
jamesbraid wants to merge 1 commit into
mainfrom
land/sync-compile
Draft

jamesbraid wants to merge 1 commit into
mainfrom
land/sync-compile

Conversation

@jamesbraid

@jamesbraid jamesbraid commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

With jitv2.compile = "sync" the dispatch miss compiled at every new
entry on a page, so a page with many entries re-emitted itself until the
code arena filled, flushed and started over. An IRIX 6.5.22 Indy never
reached login that way.

The sync path now asks what the threaded path asks. It compiles when the
page has no code, or when this arrival is the one that makes the pending
request hot; any other new entry, on a page with current or stale code,
is interpreted and counted. The check is two atomic operations on the
page and the existing func pointer, so the dispatch path gains no lock.

An IRIX 6.5.22 Indy now reaches login with sync (285 s and 300 s on a
loaded host; 145 s with the default compile mode).

With jitv2.compile = "sync" the dispatch miss compiled at every new
entry on a page, so a page with many entries re-emitted itself until the
code arena filled, flushed and started over. An IRIX 6.5.22 Indy never
reached login that way.

The sync path now asks what the threaded path asks. It compiles when the
page has no code, or when this arrival is the one that makes the pending
request hot; any other new entry, on a page with current or stale code,
is interpreted and counted. The check is two atomic operations on the
page and the existing func pointer, so the dispatch path gains no lock.

An IRIX 6.5.22 Indy now reaches login with sync (285 s and 300 s on a
loaded host; 145 s with the default compile mode).
@jamesbraid
jamesbraid marked this pull request as draft November 14, 2026 22:26
@jamesbraid jamesbraid changed the title jitv2: recompile a hot page once per batch in sync mode jitv2: in sync mode, recompile a page with code only when it goes hot Nov 14, 2026
@jamesbraid
jamesbraid force-pushed the land/sync-compile branch 2 times, most recently from f83a474 to 6b868b5 Compare November 15, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant