Review request: 8025096: Move the ChunkManager instances out of the VirtualSpaceLists
Jon Masamitsu
jon.masamitsu at oracle.com
Fri Sep 20 15:49:13 PDT 2013
Stefan,
Would you consider changing _chunk_manager_class
to _chunk_manager_compressed_classes? It is long but
it reminds me what exactly it is.
metaspace.cpp
651 size_t small_chunk_size() { return (size_t) is_class() ? ClassSmallChunk : SmallChunk; }
Can you have 3 arrays of chunks sizes
_specialized[] = {SpecializedChunk, SpecializedChunk}
_small_chunks[] = {ClassSmallChunk, SmallChunk}
_meduim_chunks[] = {ClassMediumChunk, MediumChunk}
and then the static
static size_t small_chunk_size() { return _small_chunks[_index_of_mdtype]; }
Does purge() work for compressed class space?
> void Metaspace::purge() {
> MutexLockerEx cl(SpaceManager::expand_lock(),
> Mutex::_no_safepoint_check_flag);
> purge(NonClassType);
> if (using_class_space()) {
> purge(ClassType);
> }
> }
Is compressed class space still supported by a single VirtualSpace?
I think the idea behind purge() is to check for VirtualSpaces that are
filled with unused chunks and release the VirtualSpace.
Jon
On 9/19/2013 11:54 PM, Stefan Karlsson wrote:
> http://cr.openjdk.java.net/~stefank/8025096/webrev.01/
>
> New webrev based on Coleen's comments.
>
> Changes:
> - Moved the _vs_list pointer out from SpaceManager
> - Removed the unused _medium_chunk_bunch field.
>
> thanks,
> StefanK
>
> On 9/19/13 9:48 PM, Stefan Karlsson wrote:
>> http://cr.openjdk.java.net/~stefank/8025096/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8025096
>>
>> In the fix for 'JDK-8024547
>> <https://bugs.openjdk.java.net/browse/JDK-8024547>: MaxMetaspaceSize
>> should limit the committed memory used by the metaspaces' we need to
>> make a clearer distinction between when new memory is committed and
>> when memory is allocated inside already committed memory.
>>
>> Moving the ChunkManager, which handles the free chunk list, out of
>> the VirtualSpaceList, which handles the committed metaspace memory,
>> is a step in that direction.
>>
>> Changes:
>> - Move the ChunkManager instances from VirtualSpaceList to SpaceManager.
>> - Move the inc_container_count() into ChunkManager::free_chunks_get.
>> Now the Chunk manager calls dec_container_count when chunks are
>> inserted in the chunk free list and inc_container_count when chunks
>> are removed from the chunk free list.
>> - Moved the ChunkManager::chunk_freelist_allocate() call out from the
>> VirtualSpaceList::get_new_chunk()
>>
>> thanks,
>> StefanK
>
More information about the hotspot-dev
mailing list