Skip to content

support concurrent immix - #300

Closed
oscardssmith wants to merge 22 commits into
mmtk:masterfrom
oscardssmith:os/concurrent-immix
Closed

support concurrent immix#300
oscardssmith wants to merge 22 commits into
mmtk:masterfrom
oscardssmith:os/concurrent-immix

Conversation

@oscardssmith

@oscardssmith oscardssmith commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Requires JuliaLang/julia#61215 to function

@qinsoon

qinsoon commented Mar 3, 2026

Copy link
Copy Markdown
Member

May need to change here to add concurrent Immix:

mmtk-julia/Makefile

Lines 28 to 30 in a519810

else
$(error "Unsupported MMTk plan: $(MMTK_PLAN)")
endif

@qinsoon

qinsoon commented Mar 3, 2026

Copy link
Copy Markdown
Member

julia-version
JULIA_REPO=oscardssmith/julia
JULIA_REF=os/concurrent-immix

@qinsoon

qinsoon commented Mar 3, 2026

Copy link
Copy Markdown
Member

julia-version JULIA_REPO=oscardssmith/julia JULIA_REF=os/concurrent-immix

Further CI runs in this PR will use your Julia branch.

@qinsoon

qinsoon commented Mar 4, 2026

Copy link
Copy Markdown
Member

I pushed a change (6a85a86) to use this mmtk-core PR: mmtk/mmtk-core#1454 (I will get it merged soon), also a minor fix for scheduling SweepVMSpecific. Now it ran through a concurrent marking cycle, and then segfaulted.

@oscardssmith

Copy link
Copy Markdown
Contributor Author

nice! I've just pushed a bunch of changes to the julia side which might let it get further (will test once I get stock gc compiling again)

@oscardssmith
oscardssmith marked this pull request as ready for review May 11, 2026 21:26
@qinsoon

qinsoon commented May 12, 2026

Copy link
Copy Markdown
Member

@oscardssmith I looked at some time outputs from build steps to roughly check the performance of concurrent immix vs immix. At a glance, it looks reasonable. Concurrent Immix has some expected slowdown, compared to Immix.

Immix

...
Compiling the compiler. This may take several minutes ...
Base.Compiler ──── 312.22207379341125 seconds
...
Base  ────────── 35.277991 seconds
FileWatching  ──  4.001158 seconds
Libdl  ─────────  0.001727 seconds
Artifacts  ─────  0.290458 seconds
SHA  ───────────  0.251190 seconds
Sockets  ───────  0.766023 seconds
LinearAlgebra  ─  7.174226 seconds
Random  ────────  1.013626 seconds
Stdlibs total  ─ 13.503446 seconds
Sysimage built. Summary:
Base ────────  35.277991 seconds 72.3185%
Stdlibs ─────  13.503446 seconds 27.6815%
Total ───────  48.781451 seconds
...
Precompilation complete. Summary:
Total ───────   6.189272 seconds
Outputting sysimage file...
Output ──────  57.502925 seconds

ConcurrentImmix

...
Compiling the compiler. This may take several minutes ...
Base.Compiler ──── 322.34418296813965 seconds
...
Base  ────────── 37.418032 seconds
FileWatching  ──  4.162385 seconds
Libdl  ─────────  0.001794 seconds
Artifacts  ─────  0.321067 seconds
SHA  ───────────  0.258250 seconds
Sockets  ───────  0.878940 seconds
LinearAlgebra  ─  7.397704 seconds
Random  ────────  1.015542 seconds
Stdlibs total  ─ 14.040672 seconds
Sysimage built. Summary:
Base ────────  37.418032 seconds 72.7147%
Stdlibs ─────  14.040672 seconds 27.2853%
Total ───────  51.458716 seconds
...
Precompilation complete. Summary:
Total ───────   6.500720 seconds
Outputting sysimage file...
Output ──────  60.748564 seconds

@oscardssmith

Copy link
Copy Markdown
Contributor Author

Looks like consistent ~5% slowdown which is on the high side of reasonable, but still reasonable.

@oscardssmith

Copy link
Copy Markdown
Contributor Author

Can you get this rebased and merged? I think it's ready.

@qinsoon

qinsoon commented May 12, 2026

Copy link
Copy Markdown
Member

Can you get this rebased and merged? I think it's ready.

I rebased the PRs (this one and the one in the Julia repo). The tests are failing because of the issue in JuliaLang/julia#61769 (JuliaLang/julia#61769 does not resolve the issue, I will work further on it).

oscardssmith and others added 16 commits June 17, 2026 13:33
Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
Currently `MMTK_SIDE_LOG_BIT_BASE_ADDRESS` is defined in the binding
side. When we embed this symbol in the JIT code, Julia needs to be able
to resolve to the variable. This PR moves it to the Julia side. This PR
needs JuliaLang/julia#61769 to work.
In preparation for moving flush() out of mmtk-core's ScanMutatorRoots,
have the binding flush at the end of its own per-mutator scan. This is
currently a double-flush (safe; second one drains an empty buffer) but
sets up the contract change in mmtk-core.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oscardssmith
oscardssmith force-pushed the os/concurrent-immix branch from 9a116bc to 5d3bb0a Compare June 17, 2026 18:12
@qinsoon
qinsoon force-pushed the os/concurrent-immix branch from f5244a7 to 9747ebe Compare July 2, 2026 04:58
@qinsoon

qinsoon commented Jul 6, 2026

Copy link
Copy Markdown
Member

Since the binding code has been moved to Julia, the binding changes in this branch is moved to JuliaLang/julia#61215.

@oscardssmith

Copy link
Copy Markdown
Contributor Author

yeah. I need to rebase this pr to include the binding changes

@oscardssmith

Copy link
Copy Markdown
Contributor Author

never mind. I see you've handled that. thanks!

oscardssmith added a commit to JuliaLang/julia that referenced this pull request Aug 6, 2026
Very WIP. Requires mmtk/mmtk-julia#300

---------

Co-authored-by: Yi Lin <qinsoon@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cody Tapscott <topolarity@tapscott.me>
Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com>
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.

2 participants