RFR: 8260044: Parallel GC: Concurrent allocation after heap expansion may cause unnecessary full gc [v2]

Kim Barrett kbarrett at openjdk.java.net
Mon Feb 8 23:46:01 UTC 2021


On Mon, 1 Feb 2021 09:55:09 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   require non-zero expand size
>
> Looks good!

The problem being addressed here is closely related to the "expand storm"
problem from JDK-8260045. I thought this one could be addressed separately
first, but now think not. Consider if we do an expand with excess here that
uses the remainder of the permitted space. If another thread was blocked
waiting to expand, its expand attempt will fail. With the old code, there
would still be another allocation attempt, but now the failing expand won't
do that.

Reversing the order of fixes doesn't work very well either, as avoiding the
expand storm needs the same sort of infrastructure for retrying a failed
allocation after (optional) expansion.

New commit "avoid expand storms" adds that fix.  It's a little bit kludgy
because of JDK-8261284, adding a function to MutableSpace for use only by
PSOldGen.  It's not the only weird function or behavior in MutableSpace.

Testing:
mach5 tier1-3, tier5 (tiers with common tests run with ParallelGC)

-------------

PR: https://git.openjdk.java.net/jdk/pull/2309



More information about the hotspot-gc-dev mailing list