-
Notifications
You must be signed in to change notification settings - Fork 85
Simplified LXR GC #1508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
wenyuzhao
wants to merge
1,754
commits into
mmtk:master
Choose a base branch
from
wenyuzhao:lxr-x/simplified
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Simplified LXR GC #1508
Changes from 250 commits
Commits
Show all changes
1754 commits
Select commit
Hold shift + click to select a range
9351018
Add regression test results
wenyuzhao 2dc90ac
Fix potential leak and virtual memory OOM
wenyuzhao be2fdb5
minor
wenyuzhao 466ffd3
lxr_precise_incs_counter
wenyuzhao 9e9f916
minor
wenyuzhao 110b5fd
minor
wenyuzhao cf5bf17
minor
wenyuzhao 5d6c0fa
Flush barrier-generated mark queue before `FinishConcurrentWork` buck…
wenyuzhao 4c45354
Fix SATB without lazy decrements
wenyuzhao a56e00b
Fix lazy sweep counters
wenyuzhao cf1faf2
Improve SATB performance
wenyuzhao 7d83dae
wip: simple SATB trigger
wenyuzhao af39191
wip: limit number of concurrent workers
wenyuzhao 2f9c481
wip
wenyuzhao fda36aa
Minor SATB optimizations
wenyuzhao 598228e
Trigger final mark pause right after SATB is finished
wenyuzhao 9dda971
wip
wenyuzhao 896011f
working
wenyuzhao f51a58a
wip
wenyuzhao 9ec3b58
cleanup
wenyuzhao 2f11502
cleanup
wenyuzhao 432c273
minor
wenyuzhao 6ca0a55
Concurrent marking optimizations
wenyuzhao 281aed8
Fix space check optimization
wenyuzhao 2dedda9
measure trace rate
wenyuzhao 43d912e
lxr_no_mature_defrag
wenyuzhao 7502428
minor fix
wenyuzhao b094de6
wip
wenyuzhao 9ed9544
Optimize defrag check
wenyuzhao da40c1b
Fix CM array slice enqueuing
wenyuzhao 4ab99bb
Change lxr_simple_satb_trigger threshold
wenyuzhao 62334af
Update performance history
wenyuzhao 044d204
More concurrent marking optimizations
wenyuzhao 4ea7c56
Update history.md
wenyuzhao 8ef25ab
log class unloading finish time
wenyuzhao 292f48d
Add cls unloading timer
wenyuzhao 0f1d2a7
Fix typo
wenyuzhao af8c570
Fix GC counter
wenyuzhao da032dc
Minor optimizations
wenyuzhao c62b108
Fix lxr_no_rc_in_cm
wenyuzhao 7ce7904
Enable opt by default
wenyuzhao 04218e9
Remove minor optimization switches
wenyuzhao 04e8d13
Cleanup
wenyuzhao 52a5075
Fix unmark performance
wenyuzhao 1535fbb
More const fn
wenyuzhao 6610752
Minor tweaks
wenyuzhao 0c5a0c6
Increase marking threads only after al mutators are yielded
wenyuzhao 26cc31d
Minor
wenyuzhao 08a1df1
Fix long yieldpoint time
wenyuzhao 3b8a743
aggressive_mature_evac
wenyuzhao 432d320
Fix build error
wenyuzhao f3481a7
Minor
wenyuzhao c76d050
Add more counters
wenyuzhao f7eef77
Add a flag to disable decrements completely
wenyuzhao 89a9fce
Don't enqueue marked objects in barrier slow-path when decs are disabled
wenyuzhao 77e8ea6
SATB: Don't enqueue marked fields
wenyuzhao 00a74c0
Remove unused block dead bytes counter
wenyuzhao 7d91263
Update fragmentation_analysis to measure SATB fragmentation
wenyuzhao c208787
Fix LOS object release
wenyuzhao 08ba80d
heap demographics dump to stderr
wenyuzhao 2567d72
Higher fragmentation_analysis frequency
wenyuzhao 2dd7e41
no_meta_counting by default
wenyuzhao 2d03fb0
Fix mature defrag
wenyuzhao 27b4353
cleanup
wenyuzhao 919f427
WIP: Fix code cache unloading
wenyuzhao e5a40d4
Fix class unloading
wenyuzhao 33c617e
WIP: Fix class unloading
wenyuzhao f233051
Fix weak roots marking
wenyuzhao 09c28f5
Update lxr_release_stage_timer
wenyuzhao 225c7cc
Refactor
wenyuzhao 439409d
More mature defrag
wenyuzhao a71f526
revert
wenyuzhao 7846038
cleanup
wenyuzhao 5f98c0f
Fix sanity checker
wenyuzhao 23dfdd2
Fix sanity checker
wenyuzhao 2eef0f5
cleanup
wenyuzhao 0cdb5f6
wip
wenyuzhao 990ca74
wip
wenyuzhao 220b174
fix
wenyuzhao d8030f2
Incs rate measurement support
wenyuzhao 6c27ccd
Merge branch 'lxr' of https://github.com/wenyuzhao/mmtk-core into lxr
wenyuzhao 163db5f
Merge branch 'lxr' into lxr-fix-unload
wenyuzhao de7c632
cleanup
wenyuzhao 39d7621
g3_compatibilities
wenyuzhao 1665a55
Update README.md
wenyuzhao 740704a
Add latest performance result
wenyuzhao 0803c73
Fix date
wenyuzhao e1fb265
ebpf scripts
wenyuzhao 9aae0cc
fix
wenyuzhao 5584f5a
Update README.md
wenyuzhao d0b7293
Update README.md
wenyuzhao d275944
Fix crash when disabling compressed oops
wenyuzhao eded7e1
Fix clippy and rust-analyzer warnings
wenyuzhao 5206227
cleanup
wenyuzhao ae56f4c
WIP: Fix immix
wenyuzhao e8cc39e
Fix immix barrier
wenyuzhao aa14275
Fix immix barrier
wenyuzhao 8f76a35
Remove no_meta_counting
wenyuzhao ff8cf7d
Remove one not-working CM optimization
wenyuzhao e24e371
Minor optimization to RC decrements
wenyuzhao e8ba336
initial prefetch support
wenyuzhao e45466b
prefetch
wenyuzhao 5264be6
cas optimizations
wenyuzhao 723deac
prefetch steps
wenyuzhao ea730f1
More prefetch
wenyuzhao 0a901cf
write prefetch
wenyuzhao b41321c
cleanup
wenyuzhao d51d9d4
Merge tag 'v0.21.0' into lxr-merge
wenyuzhao 089822a
Fix gc phase counter
wenyuzhao de15100
Merge tag 'v0.22.0' into lxr-merge
wenyuzhao 4160431
Merge tag 'v0.23.0' into lxr-merge
wenyuzhao 97bec3b
Merge tag 'v0.24.0' into lxr-merge
wenyuzhao afd94fd
Merge commit '5ab62f96c006475285b00b6d20a8b1bf83b74a4d' into lxr-merge
wenyuzhao d4ff692
Fix Immix GC
wenyuzhao e26c1e0
Merge commit '1b9cfe40a8bd34fd0c7cc3681a4fe5e7cdb7e167' into lxr-merge
wenyuzhao e3ba5e6
Merge commit 'a02803b4104519ff2289234101a2dd8ceedd1bc7' into lxr-merge
wenyuzhao aec3fa2
Merge tag 'v0.25.0' into lxr-merge
wenyuzhao 9ccbfc3
Merge commit '56b2521d2b99848ee0613a0a5288fe6d81b754ba' into lxr-merge
wenyuzhao ada2732
Merge tag 'v0.26.0' into lxr-merge
wenyuzhao abd73a8
cleanup
wenyuzhao b383f7c
Fix Immix GC
wenyuzhao 163e6ea
Update performance history
wenyuzhao 344a97f
Minor markdown tweaks
wenyuzhao 905850e
batched chunk packets
wenyuzhao 3ca9c80
cleanup
wenyuzhao 6be6a84
Minor
wenyuzhao e7d9dd9
[immix] batched chunk processing
wenyuzhao 10da2ea
[immix] optimizations and refactoring
wenyuzhao 598820f
cleanup
wenyuzhao 138c204
Fix rust 1.80 warnings
wenyuzhao cad4370
Fix Immix OOM
wenyuzhao d65b83b
refactor and cleanup
wenyuzhao 9d4dafd
cleanup & refactor
wenyuzhao 76c5060
Merge tag 'v0.27.0' into lxr-merge
wenyuzhao 8886357
Merge tag 'v0.28.0' into lxr-merge
wenyuzhao db37c51
Merge tag 'v0.29.0' into lxr-merge
wenyuzhao 1f8128b
Merge tag 'v0.30.0' into lxr-merge
wenyuzhao fe3430b
Merge branch 'master' into lxr-merge
wenyuzhao 432ce91
fmt and fix warnings
wenyuzhao fb5002c
fix transparent huge page
wenyuzhao 2952f6f
Merge branch 'lxr-merge' of https://github.com/wenyuzhao/mmtk-core in…
wenyuzhao 97443c0
fix transparent huge page
wenyuzhao 8355c0a
Fix STW-LXR
wenyuzhao 363c959
Remove spin lock in field barrier slow-path
wenyuzhao b8f5bcc
fix: Prevent re-logging already logged slots in the LXR barrier.
wenyuzhao e1af7fc
No perf_counter by default
wenyuzhao 4122b10
Merge tag 'v0.31.0' into lxr-merge
wenyuzhao 8ca2f67
Merge commit '74dadfd112070f6b6cadca3df44d2c6375d742dc' into lxr-merge
wenyuzhao 00018e3
Merge commit '8b32d04e883e26ffc91ab74504ae62b5b3b65afd' into lxr-merge
wenyuzhao 50be332
Merge commit 'c5ead72a87bcc8cc49b5e7a62cf71d848b4b4c9b' into lxr-merge
wenyuzhao 51ebea6
Merge commit '3d89bb51c191d3077278684ec5059726128d3e2b' into lxr-merge
wenyuzhao 580fed6
Merge commit '54b5e152e43af3ea18d6d90768690cd89adcc7b8' into lxr-merge
wenyuzhao 116ed16
Merge commit '7d798ad8a71aa6df80f58f5e565e4f9274d06871' into lxr-merge
wenyuzhao 6557678
Merge commit '0721d12609ff85f91fef9342462d15db36dd0711' into lxr-merge
wenyuzhao 113014c
Merge commit 'e5284edf293face97a3f2f17c168962e116e38cd' into lxr-merge
wenyuzhao 1dcf01f
Merge commit '6eb1328bfce34a7e0fc4b84fd0b65a849b083e0e' into lxr-merge
wenyuzhao 0b5aa3c
Merge commit 'd7d0bdcd823c5608b6968c12ca463b07c0b021a0' into lxr-merge
wenyuzhao f13ba7d
Merge commit '29fa871998821ddfdbb95066d9b111769aa1b940' into lxr-merge
wenyuzhao c84130b
Merge commit 'a4dd70cb70a116a32b1bbb20501c48f77f49181b' into lxr-merge
wenyuzhao ff7e64d
Merge commit '63c007e9c6f426f08f2ca30b2bfda7e7499f98bd' into lxr-merge
wenyuzhao 603e29b
Merge tag 'v0.32.0' into lxr-merge
wenyuzhao c05ab30
Skip marking for weak roots
wenyuzhao dd43553
Fix concurrent work scheduling when gc_threads == 1
wenyuzhao 201d2df
Fix the identification of invalid remset entries
wenyuzhao bc5d833
Minor fix
wenyuzhao 5f7e2dc
Fix dead object scanning during RC decs
wenyuzhao 6790b6d
Add a cargo flag to measure barrier takerate
wenyuzhao 6ee63ab
Fix CLD scan in RC decs
wenyuzhao 8c17aa5
Arraycopy barrier optimization
wenyuzhao fc3a6fc
Fix jme on jdk21
wenyuzhao 67dbb8f
Fix
wenyuzhao 78e2eec
WIP
wenyuzhao 7cf1c4f
Fix
wenyuzhao cb1ae9d
optimiza
wenyuzhao 62748d8
cleanup
wenyuzhao c853057
cleanup
wenyuzhao 7548423
cleanup
wenyuzhao 5893ee8
cleanup
wenyuzhao e8d9d36
cleanup
wenyuzhao d3c3500
cleanup
wenyuzhao 9cf4db3
cleanup
wenyuzhao 68f2117
Revert block allocator changes
wenyuzhao 142546a
Minor
wenyuzhao d0cdc39
cleanup
wenyuzhao 7d132d5
cleanup
wenyuzhao d5c53d2
cleanup
wenyuzhao b2b5b1e
Revert class unloading support
wenyuzhao f7d3604
Revert weak refs
wenyuzhao 101c93e
WIP: simplify
wenyuzhao 2b2640f
Remove custom gc_log instrumentation infrastructure
wenyuzhao bcbbf54
Remove bulk thread scanning, non-LXR features, and instrumentation code
wenyuzhao 4d26907
Remove array scanning optimization from LXR GC
wenyuzhao c9272a6
Refactor GC work and scheduler components
wenyuzhao 9aaaf21
Refactor LXR plan components and remove unused code
wenyuzhao ad00c8e
Fix xalan crash
wenyuzhao c37b993
Refactor: move LXR global state and constants into plan::lxr module
wenyuzhao 69c9746
Refactor: simplify object tracing methods and replace HashMap with Ha…
wenyuzhao 6bbaa69
Revert LOS to use treadmill
wenyuzhao 0bc746f
revert freelistpageresource.rs changes
wenyuzhao d289533
revert blockpageresource.rs changes
wenyuzhao a65353b
Refactor: remove unnecessary parameters and clean up code in various …
wenyuzhao 19edce0
refactor: consolidate LXR/RC work packets under plan/lxr/
wenyuzhao 6b10d79
refactor: move BlockAllocation to plan/lxr behind ImmixHooks trait
wenyuzhao d3477a5
refactor: clean up code by removing unused parameters and simplifying…
wenyuzhao fe4230d
Implement ConcurrentPlan
wenyuzhao a63f8d9
Remove VMCollection::set_concurrent_marking_state
wenyuzhao c757d56
Fix LOS metadata
wenyuzhao 1903618
refactor: remove unused methods and simplify logic in global and LXR …
wenyuzhao c2fa409
Refactor concurrent packet scheduling
wenyuzhao 9ff8fd9
Scheduler cleanups
wenyuzhao 7b2a415
cleanup
wenyuzhao 8a4ead9
Refactor and cleanup
wenyuzhao 618959f
cleanup
wenyuzhao 371fc4f
Minor fix
wenyuzhao 30d1646
Minor
wenyuzhao f3b5ef7
Refactor work bucket stages and update root scanning logic
wenyuzhao 35b1ee9
Merge remote-tracking branch 'origin/master' into lxr-x/simplified-merge
wenyuzhao 3003925
Fix CI issues (done by Claude)
qinsoon 9b1ff4c
Fix docs. Done by claude
qinsoon 3ce65fb
Merge branch 'master' into lxr-x/simplified
qinsoon 71778fa
Merge branch 'master' into lxr-x/simplified
wks d5616d7
Work around the null check in one test
qinsoon c7cf45d
Allow 1/4 global side metadata on 32bits (to accomodate LXR with vo bit)
qinsoon d83a4f5
Fix a test case for 32 bits (worst ratio changed)
qinsoon c286843
Fix clippy check
qinsoon d72e64b
Revert changes to Block::sweep
wks 8f3c129
Use -1 as invalid chunk
wks b147e1e
GC status transition logging
wks 3027b79
Use `add_deferred` for concurrent bucket.
wks b37aba1
Revert "Use `add_deferred` for concurrent bucket."
qinsoon e04e7ec
Don't flip queues for non-lxr plans
qinsoon 9997259
Merge branch 'master' into lxr-x/simplified
qinsoon 4f608cc
Gate two places: reusable block flush and allocate as live. They are …
qinsoon f824670
Log LXR GC scheduling
wks 6d9956f
cargo fmt
wks 087bab9
Enable VO bits for LXR
wks e8edabd
Remove methods already implemented by Region
wks 824bbfe
Merge branch 'master' into lxr-x/simplified
wks 8af79ad
Fix build and merge pause start/end hooks
wks 7bc24da
Merge branch 'master' into lxr-x/simplified
qinsoon 7609f50
Add missing cfg(feature = "vo_bit")
qinsoon 6424b73
Add UnstraddlableRegion
wks e64a162
Merge remote-tracking branch 'refs/remotes/wenyuzhao/lxr-x/simplified…
wks 41d579d
Cleanup
wks ddb2f2e
Fix clippy warning
wks a92d9e9
Merge the two SlotIterator implementations.
wks ff05c9d
Restore unreachable! in unreachable_prepare_func
wks 7925414
Remove assert_is_flushed
wks 3d69aa9
Move LOGGED_VALUE and UNLOGGED_VALUE to log_bit
wks 0a8ce6e
Restore the create_process_roots_work API
wks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even in
master, mmtk-openjdk has always been passing NULLtlswhen callingmmtk.harness_begin, and MMTk passes the NULLtlsback to mmtk-openjdk viaVM::VMCollection::block_for_gc, and mmtk-openjdk simply ignores thetlsparameter inCollection::block_for_gc.So why do we skip the
block_for_gchere whentlsis null (which is always true for OpenJDK)? There may be some LXR-specific considerations.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly in
handle_user_collection_request,block_for_gcis only called if tls is not null. This causes one test to hang (astlsin the test is null andblock_for_gcis never called).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the test tls to 1 to work around the issue. There is a FIXME to remind us to remove the workaround before merging the PR.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LXR openjdk binding enables vm thread triggered GC. This is mainly to support metaspace GC.
Such GC requests are triggered by VM threads, and handle_user_collection_request should not block so that VM thread can continue execution. For these GC requests there is no TLS available.
The one in harness_begin is to just force block current thread again, since harness_begin has TLS == NULL as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add an argument for
handle_user_collection_requestto indicate non blocking. Or, we could have a different API, as requests from vm thread are not 'user requests' anyway.