-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8310031: Parallel: Implement better work distribution for large object arrays in old gen #14846
Closed
reinrich
wants to merge
44
commits into
openjdk:master
from
reinrich:ps_parallel_scanning_of_large_arrays_in_old
+264
−157
Closed
Changes from 2 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
53c7b66
8310031: Parallel: Implement better work distribution for large objec…
reinrich 0eb924e
Make sure to skip stripes where no object starts
reinrich 5b802ed
Limit effect of previous commit to large array handling
reinrich d7ab2b0
Apply Thomas' suggestions
reinrich 67edf28
Merge branch 'master'
reinrich d535a10
objArrayOopDesc::oop_oop_iterate_bounded must be defined in objArrayO…
reinrich 9a2b230
100 stripes per active worker thread
reinrich 3e6c1b7
Scan large array stripe from first dirty card to stripe end
reinrich 71a3c44
Revert back to precise scanning of large object arrays
reinrich bba1d2a
find_first_clean_card: avoid expensive start array queries on long ar…
reinrich ac6bddb
Avoid expensive start array queries on long arrays
reinrich 86747ff
Feedback Thomas
reinrich 268e208
Small clean-ups
reinrich 6033358
Limit stripe size to 1m with at least 8 threads
reinrich d4b5fd4
Do all large array scanning in separate method
reinrich a4d6af9
First card of large array should be cleared if dirty
reinrich d75bd60
Eliminate special case for scanning the large array end
reinrich 50737dd
Remove stripe size adaptations and cache potentially expensive start …
reinrich 780a03d
Reset to master
reinrich 817b164
Split work strictly at stripe boundaries
reinrich 22fe849
Parallel copying of imprecise marks to stripes
reinrich 78a08cf
Overlap scavenge with pre-scavenge
reinrich d845e65
Missed acquire semantics
reinrich 8b13c83
Cleanup
reinrich 272ab97
find_first_clean_card: return end_card if final object extends beyond…
reinrich 8b544d8
Shadow table per stripe
reinrich 8b22c28
Cleanup
reinrich e212413
Don't overlap card table processing with scavenging for simplicity
reinrich 1462bbf
Simplification suggested by Albert
reinrich c9e040f
Make sure to scan obj reaching in just once
reinrich 443f482
Re-cleanup (was accidentally reverted)
reinrich 381e001
Merge branch 'master'
reinrich d12e96e
Feedback Albert
reinrich 607f0c2
Remove obsolete comment
reinrich bbb128e
Merge branch 'master'
reinrich f796551
Use better name: _preprocessing_active_workers
reinrich 26f0636
preprocess_card_table_parallel should be private
reinrich 7843a02
Small cleanup changes suggested by Thomas.
reinrich bd853c4
More small changes Thomas suggested (line-breaks needed)
reinrich fd5d072
Review Thomas
reinrich 7c20c9f
Cleanup/improve comments
reinrich 67416b2
Accepting Thomas' (smaller) suggestions
reinrich a443042
Review Thomas (PSStripeShadowCardTable)
reinrich 71b0848
Forgot to move comment to PSStripeShadowCardTable.
reinrich 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,15 @@ class PSCardTable: public CardTable { | |
static constexpr size_t num_cards_in_stripe = 128; | ||
static_assert(num_cards_in_stripe >= 1, "progress"); | ||
|
||
volatile int _scavenge_phase1_active_workers; | ||
// Pre-scavenge support. | ||
// The pre-scavenge phase can overlap with scavenging. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this obsolete? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh sure. It's obsolete now. I removed it. |
||
static size_t constexpr _pre_scavenge_sync_interval = 1*G; | ||
volatile HeapWord* _pre_scavenge_current_goal; | ||
volatile int _pre_scavenge_current_goal_active_workers; | ||
// A stripe is ready for scavenge if it's start is not higher then this. | ||
volatile HeapWord* _pre_scavenge_completed_top; | ||
// All stripes are ready for scavenge if all threads have completed pre-scavenge. | ||
volatile int _pre_scavenge_active_workers; | ||
|
||
bool is_dirty(CardValue* card) { | ||
return !is_clean(card); | ||
|
@@ -79,14 +87,27 @@ class PSCardTable: public CardTable { | |
void clear_cards(CardValue* const start, CardValue* const end); | ||
|
||
public: | ||
PSCardTable(MemRegion whole_heap) : CardTable(whole_heap), _scavenge_phase1_active_workers(0) {} | ||
PSCardTable(MemRegion whole_heap) : CardTable(whole_heap), | ||
_pre_scavenge_current_goal(nullptr), | ||
_pre_scavenge_current_goal_active_workers(0), | ||
_pre_scavenge_completed_top(nullptr), | ||
_pre_scavenge_active_workers(0) {} | ||
|
||
static CardValue youngergen_card_val() { return youngergen_card; } | ||
static CardValue verify_card_val() { return verify_card; } | ||
|
||
void pre_scavenge(uint active_workers); | ||
void pre_scavenge(HeapWord* old_gen_bottom, uint active_workers); | ||
|
||
// Scavenge support | ||
|
||
// Propagate imprecise card marks from object start to the stripes an object extends to. | ||
// Pre-scavenging and scavenging can overlap. | ||
void pre_scavenge_parallel(ObjectStartArray* start_array, | ||
HeapWord* old_gen_bottom, | ||
HeapWord* old_gen_top, | ||
uint stripe_index, | ||
uint n_stripes); | ||
|
||
void scavenge_contents_parallel(ObjectStartArray* start_array, | ||
HeapWord* old_gen_bottom, | ||
HeapWord* old_gen_top, | ||
|
This file contains 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
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.
(I saw that this is actually duplicated from the .hpp file. Better to improve the one in the .hpp file and remove this one)