RFR: 8251158: Implementation of JEP 387: Elastic Metaspace [v9]
Thomas Stuefe
stuefe at openjdk.java.net
Mon Oct 5 12:39:16 UTC 2020
On Sat, 3 Oct 2020 20:29:14 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Misc. Review feedback
>> - Move ClassLoaderMetaspace to own include and correct includes
>
> src/hotspot/share/memory/metaspace/freeChunkList.hpp line 74:
>
>> 72: // structure can easily be optimized (e.g. a BST). But for now lets keep this simple.
>> 73:
>> 74: class FreeChunkList {
>
> This is about the 3rd list implementation (so far) in this change (boilerplate code!). It would be awesome if one or
> two could be replaced with
> [LinkedList](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/utilities/linkedlist.hpp). Currently this is
> not possible, because `LinkedListNodes` cannot be placed into the payload. What about filing a RFE about adding and
> using a `LinkedList` implementation that allows this?
Yes, this could possibly be done. Its a bit of a matter of taste. In this case note that FreeChunkList orders chunks by
commit state on insert, and does other stuff particular to that list, so you will need to revive that functionality. As
it is now I find this coding clear and easy to read. Any solution we arrive at after factoring out should not be worse.
> src/hotspot/share/memory/metaspace/chunkManager.hpp line 118:
>
>> 116:
>> 117: // On success, returns a chunk of level of <preferred_level>, but at most <max_level>.
>> 118: // The first first <min_committed_words> of the chunk are guaranteed to be committed.
>
> Typo: first first.
ok
-------------
PR: https://git.openjdk.java.net/jdk/pull/336
More information about the hotspot-gc-dev
mailing list