RFR: 8280087: G1: Handle out-of-mark stack situations during reference processing more gracefully [v5]
Ivan Walulya
iwalulya at openjdk.org
Mon Dec 11 16:09:17 UTC 2023
On Mon, 11 Dec 2023 15:50:08 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> The approach I have in mind is to 'hardcode' the #expands to a constant, let's say 4.
I don't like the hardcoded approach because we end up picking random numbers such as the 4 expands in your example without much reason to support that.
> In the double-on-expand case, there is only a single expand, effectively losing the elasticity of a growable mark-stack.
I wanted to maintain the expansion by doubling capacity as is in the current implementation. Any attempts to optimise seem premature to me.
> equal-delta ((8-4)/4 == 1): 4 -> 5 -> 6 -> 7 -> 8
You are growing too slow, if the initial 4 overflows, and you grow by 1, with high probability you will overflow the 5, actually thought you would suggest growing by the init (4). But again, I don't like the idea of hardcoded number of expands as I am not sure about the motivation behind it.
> I think equal-delta will have a simpler implementation.
I find the proposed approach really easy.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16979#discussion_r1422733524
More information about the hotspot-gc-dev
mailing list