RFR: 8330071: GenShen: Allow old to expand again at end of each GC [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Fri Apr 12 18:05:09 UTC 2024


On Thu, 11 Apr 2024 21:45:03 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> What would go wrong if, as indicated in your comments, you were to return `heap - min_young` for `max(old)`, and `heap - max_young` for `min(old)` ?
>> 
>> If nothing would go wrong, why not do that? If something would go wrong if one did that, may be that needs to be documented along with the comment you added.
>
>> @ysramakrishna : Nothing would go wrong. It's just more computation for no increased value. Before transferring regions from generation src to generation dest, we confirm that the proposed transfer does not violate minimum size of src generation or maximum size of dest generation.
> 
> I'd err in that case on the side of the trivial extra work in the method to keep its semantics clear and complete, rather than expect its clients to carry that knowledge, best to avoid surprises and keep the code maintainable. I doubt that the little extra compute is worth the potential future trouble.
> 
> I realize this view is somewhat subjective, so I'll let you decide which way you go on this, even though I personally vote for clarity and cleanliness in code rather than cleverness and frugality that might lead to less maintainability in the future. 
> 
> Reviewed!

Thanks @ysramakrishna for your suggestion.  I will make this change.  Am retesting before integration.

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

PR Comment: https://git.openjdk.org/shenandoah/pull/421#issuecomment-2052227205


More information about the shenandoah-dev mailing list