-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
b43
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083280 | emb-9 | Mikael Gerdin | P3 | Resolved | Fixed | team |
JDK-8086444 | 8u65 | Mikael Gerdin | P3 | Resolved | Fixed | b01 |
JDK-8075952 | 8u60 | Mikael Gerdin | P3 | Resolved | Fixed | b09 |
JDK-8137552 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8077459 | emb-8u60 | Mikael Gerdin | P3 | Resolved | Fixed | team |
This re-use of the _saved_mark_word field causes confusion to readers of the code since it's not used for the same purpose as the other Space classes.
The setting and reading of this field, and the per region gc time stamp which accompanies it is also unnecessarily racy. Previously the _saved_mark_word field was set to the value of the _top pointer when a region was selected as a GC allocation region and the time stamp was set to indicate that the saved mark field should be used as a maximum address. This code had some problems with races in
Suggested fix is to introduce a new field in HeapRegions to keep track of the maximum address where card scanning is allowed and set that field at the point of retaining an OldGCAllocRegion instead of when allocations are being started. That way we get rid of the store ordering requirement in the timestamp record path.
There is still a race between the per region time stamps and the per region top pointer, where we must ensure that the time stamp store must be visible before any subsequent top stores.
This store ordering is enforced by the fact that all stores to top are either ordered with #storestore (the initial allocation) or guarded by a Mutex. To ensure that the reader path sees a consistent view it must be exectued with the proper load ordering, where we must read top before the time stamp in order to ensure that we don't see a top value which has been updated by a concurrent gc worker if we see a time stamp from a previous gc cycle.
- backported by
-
JDK-8075952 Refactor G1s usage of save_marks and reduce related races
-
- Resolved
-
-
JDK-8077459 Refactor G1s usage of save_marks and reduce related races
-
- Resolved
-
-
JDK-8083280 Refactor G1s usage of save_marks and reduce related races
-
- Resolved
-
-
JDK-8086444 Refactor G1s usage of save_marks and reduce related races
-
- Resolved
-
-
JDK-8137552 Refactor G1s usage of save_marks and reduce related races
-
- Resolved
-
- relates to
-
JDK-8058209 Race in G1 card scanning could allow scanning of memory covered by PLABs
-
- Closed
-
-
JDK-8065218 Move CMS-specific fields from Space to CompactibleFreeListSpace
-
- Resolved
-