RFR: 8166811: Missing memory fences between memory allocation and refinement
Kim Barrett
kim.barrett at oracle.com
Sat Oct 29 23:26:21 UTC 2016
> On Oct 25, 2016, at 7:13 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>
> Please review this change to address missing memory barriers needed to
> ensure ordering between allocation and refinement in G1.
> […]
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8166811
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8166811/webrev.00/
> [Based on http://cr.openjdk.java.net/~kbarrett/8166607/webrev.02/]
>
------------------------------------------------------------------------------
src/share/vm/gc/g1/g1RemSet.cpp
581 // The region could be young. Cards for young regions are dirtied,
582 // so the post-barrier will filter them out. However, that dirtying
583 // is performed concurrently. A write to a young object could occur
584 // before the card has been dirtied, slipping past the filter.
This is a rewording of the comment that used to be here. However, it
was not true even before these changes. As part of JDK-8014555 we
mark young region cards with g1_young_card_val(). That's the change
set that added the storeload to the post-barrier.
I'm not quite sure what to do about this. The comment is currently
wrong. However, the storeload is considered a problem, and there have
been various ideas discussed for eliminating it that might allow us to
go back to dirtying young cards.
------------------------------------------------------------------------------
More information about the hotspot-dev
mailing list