RFR: Use soft max capacity only for trigger calculations
Y. Srinivas Ramakrishna
ysr at openjdk.org
Wed May 17 20:59:35 UTC 2023
On Wed, 17 May 2023 20:39:56 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Use the soft max heap capacity only for the trigger's availability calculations. Our current generation sizing calculations cannot tolerate arbitrary changes to capacity. This use of soft max heap is consistent with original non-generational behavior. Here, the soft max heap capacity is applied directly as the heuristics view of the capacity of the young generation.
>
> src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp line 900:
>
>> 898: _affiliated_region_count(0), _humongous_waste(0), _used(0), _bytes_allocated_since_gc_start(0),
>> 899: _max_capacity(max_capacity), _soft_max_capacity(soft_max_capacity),
>> 900: _adjusted_capacity(max_capacity), _heuristics(nullptr) {
>
> What is `_adjusted_capacity` used for and where? (Given that I see it start out here as being no different from `_max_capacity`, but I'll read on and see if I can find the answer.)
Never mind, I see now the code that does adjustments `adjust_available()` & `unadjust_available()`, and IIRC this will be gone (or at least done differently) in Kelvin's upcoming `Expand Old On Demand` work.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/280#discussion_r1197030734
More information about the shenandoah-dev
mailing list