RFR: 8251158: Implementation of JEP 387: Elastic Metaspace [v11]
Thomas Stuefe
stuefe at openjdk.java.net
Tue Oct 6 07:03:47 UTC 2020
On Mon, 5 Oct 2020 16:04:16 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review Feedback Richard 1
>
> src/hotspot/share/memory/metaspace/metaspaceArena.cpp line 81:
>
>> 79: METACHUNK_FULL_FORMAT_ARGS(c));
>> 80: }
>> 81: }
>
> Have you thought about splitting the chunk if possible and returning the free chunk to the ChunkManager? If you return
> it to the free list of this class loader then only this loader can make use of it. If you return it to the CM then
> every loader can make use of it and, potentially, it can even be uncommitted.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/336
More information about the hotspot-gc-dev
mailing list