RFR: 8342001: GenShen: Factor cases for allocation type into separate methods [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Oct 15 17:37:40 UTC 2024


On Mon, 14 Oct 2024 22:19:37 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 899:
>> 
>>> 897: }
>>> 898: 
>>> 899: HeapWord* ShenandoahFreeSet::try_allocate_from_mutator(ShenandoahAllocRequest& req, bool& in_new_region) {
>> 
>> Why does this always use right-biased allocation from the mutator partition? (And not update allocation bias state?) Is this intentional? I assume it's because these aren't fresh allocations, but evacuations. Do evacuations with right bias end up closer to allocations for other evacuations? A brief comment explaining this difference from mutator allocation would be useful.
>
> I think it makes sense that the collector would take regions from the mutator according to the allocation bias for the _collector_. @kdnilsen , what do you think?

When the collector is trying to allocate from the "mutator partition", it biases towards high end of memory because our general goal is long-lived data (except humongous objects which live at the low-end of memory) lives at high end of memory.  Survivor regions (regions allocated by the collector) are assumed to be longer lived than ephemeral objects (regions allocated by the mutator).

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/511#discussion_r1801640062


More information about the shenandoah-dev mailing list