RFR: 8251158: Implementation of JEP 387: Elastic Metaspace [v11]

Richard Reingruber rrich at openjdk.java.net
Tue Oct 6 13:17:18 UTC 2020


On Tue, 6 Oct 2020 11:47:22 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Yes, but in practice, the benefit would be slim:
>> - it is very rare that you retire a chunk which is not even halfway used. For that to happen a metaspace allocation must
>>   be requested larger than half of the current chunk. Does not happen that often.
>> - This only affects the committed portion of the chunk. So, for larger chunks - where this could hurt - the waste (waste
>>   in the sense as "unnecessarily earmarked for one loader only") mostly consists of address space only, not committed
>>   space.
>> 
>> I'll still consider it. Albert Yang remarked something similar in an earlier review:
>> https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-August/041357.html
>> Thing is, returning a chunk to the ChunkManager would require drawing the central context lock. Right now,
>> salvage_chunk() does only need the CLD-local lock. But then, if it is rare as I wrote initially, it may not matter.
>> Lets file this for a possible future RFE.
>
> Okay, I did some statistics and salvaging chunks which are not at least half-way used is super rare. I opt in this case
> for just leaving the code as it is since splitting the salvaged chunk would mean complicating the code, apart from
> drawing the central metaspace context lock.

Ok. Thanks for doing it.

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

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



More information about the hotspot-gc-dev mailing list