8276086: Increase size of metaspace mappings

Reviewed-by: goetz, mdoerr
This commit is contained in:
Thomas Stuefe 2021-10-29 09:44:48 +00:00
parent 24cf48000a
commit e89b2c040c
2 changed files with 7 additions and 8 deletions

View File

@ -42,13 +42,12 @@ class Settings : public AllStatic {
// The default size of a VirtualSpaceNode, unless created with an explicitly specified size. // The default size of a VirtualSpaceNode, unless created with an explicitly specified size.
// Must be a multiple of the root chunk size. // Must be a multiple of the root chunk size.
// Increasing this value decreases the number of mappings used for metadata, // This value only affects the process virtual size, and there only the granularity with which it
// at the cost of increased virtual size used for Metaspace (or, at least, // increases. Matters mostly for 32bit platforms due to limited address space.
// coarser growth steps). Matters mostly for 32bit platforms due to limited // Note that this only affects the non-class metaspace. Class space ignores this size (it is one
// address space. // single large mapping).
// The default of two root chunks has been chosen on a whim but seems to work out okay static const size_t _virtual_space_node_default_word_size =
// (coming to a mapping size of 8m per node). chunklevel::MAX_CHUNK_WORD_SIZE * NOT_LP64(2) LP64_ONLY(16); // 8MB (32-bit) / 64MB (64-bit)
static const size_t _virtual_space_node_default_word_size = chunklevel::MAX_CHUNK_WORD_SIZE * 2;
// Alignment of the base address of a virtual space node // Alignment of the base address of a virtual space node
static const size_t _virtual_space_node_reserve_alignment_words = chunklevel::MAX_CHUNK_WORD_SIZE; static const size_t _virtual_space_node_reserve_alignment_words = chunklevel::MAX_CHUNK_WORD_SIZE;

View File

@ -47,7 +47,7 @@ TEST_VM(metaspace, misc_sizes) {
ASSERT_TRUE(is_aligned(Settings::virtual_space_node_default_word_size(), ASSERT_TRUE(is_aligned(Settings::virtual_space_node_default_word_size(),
metaspace::chunklevel::MAX_CHUNK_WORD_SIZE)); metaspace::chunklevel::MAX_CHUNK_WORD_SIZE));
ASSERT_EQ(Settings::virtual_space_node_default_word_size(), ASSERT_EQ(Settings::virtual_space_node_default_word_size(),
metaspace::chunklevel::MAX_CHUNK_WORD_SIZE * 2); metaspace::chunklevel::MAX_CHUNK_WORD_SIZE * NOT_LP64(2) LP64_ONLY(16));
ASSERT_EQ(Settings::virtual_space_node_reserve_alignment_words(), ASSERT_EQ(Settings::virtual_space_node_reserve_alignment_words(),
Metaspace::reserve_alignment_words()); Metaspace::reserve_alignment_words());