RFR (S): 8153170: Card Live Data does not correctly handle eager reclaim
Kim Barrett
kim.barrett at oracle.com
Thu Apr 14 04:31:08 UTC 2016
> On Apr 13, 2016, at 11:42 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
>
> Hi all,
>
> can I have reviews for the following change that makes the
> calculation of the card liveness data in regions that are reclaimed (by
> e.g. eager reclaim) exact.
>
> The card live data incorrectly considers these regions as completely
> live, preventing reclaim during the concurrent cleanup phase (as the
> recorded live bytes may be > 0 then).
>
> The mechanism is quite simple: detect these reclamations, and then
> during the card live data finalization in a stw phase recalculate
> liveness of affected regions. Detection works by updating a region's gc
> time stamp every time the region is reclaimed: if that time stamp is
> larger than the time stamp gathered when the cleanup phase starts, we
> know that the region has been modified in the meantime.
>
> This change also enables a more exact verification of the calculations,
> which is in itself a good reason for this change imo.
>
> Exact calculation of card live data in general is also necessary for
> JDK-8151846 that contains code for remembered set changes JDK-8017163.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8153170
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8153170/webrev/
> Testing:
> jprt, vm.gc
I think this looks ok.
My one concern is that I'm having trouble figuring out when a heap
region might have reset_gc_time_stamp called on it. Can that happen
in such a way that it would interfere with the use of the time_stamp
being added by these changes? I will continue to study, but maybe you
already know and can provide guidance.
Also a couple of minor things:
------------------------------------------------------------------------------
src/share/vm/gc/g1/g1CardLiveData.hpp
49 // While concurrently creating live data regions may be reclaimed (e.g. humongous
I keep having a hard time reading this because I see
"live data regions"
and wondering what those might be. How about
Regions may be reclaimed while concurrently creating live data
------------------------------------------------------------------------------
src/share/vm/gc/g1/g1CardLiveData.cpp
Several logging statements added, but this file doesn't #include
logging.
------------------------------------------------------------------------------
More information about the hotspot-gc-dev
mailing list