RFR (S): 8020155: PSR:PERF G1 not collecting old regions when humongous allocations interfer
bengt.rutisson at oracle.com
Thu Jul 11 15:26:19 UTC 2013
On 7/11/13 4:59 PM, Per Liden wrote:
> Looks good.
> On 2013-07-11 15:27, Bengt Rutisson wrote:
>> Hi everyone,
>> Could I get a couple of reviews for this small change?
>> When the marking phase finishes we signal that we should start doing
>> mixed collections by setting _last_young_gc=true. The next GC will be
>> a normal young GC but after that we will start doing mixed GCs.
>> G1CollectorPolicy::need_to_start_conc_mark() will return false if a
>> marking cycle is already in progress or if we are doing mixed GCs.
>> But it did not check the intermediate state represented by
>> _last_young_gc. Instead this was explicitly checked by
>> G1CollectorPolicy::record_collection_pause_end() for young GCs.
>> However, need_to_start_conc_mark() is also used by humongous object
>> allocations in two places. So, if a humongous allocation happens
>> after marking has finished but before the following young GC has
>> happened, we might trigger a new marking cycle and skip the mixed GCs.
>> The fix is to move the check of _last_young_gc in to
>> need_to_start_conc_mark() to make sure that we don't skip mixed GCs.
More information about the hotspot-gc-dev