[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: Make reserved_size for compressed class space and metaspace respect the ergo-initialized Compres
From:       Man Cao <manc () google ! com>
Date:       2017-11-30 22:03:59
Message-ID: CA+w6Hxa6RAcp1D4waqeCzz9VVhT=e5qfOe2qhg-huhh-zdj7bA () mail ! gmail ! com
[Download RAW message or body]

I realized that the email attachment is probably dropped by the mailing
list, so below is the inlined patch.

--- old/src/hotspot/share/memory/metaspace.cpp 2017-11-29
14:56:59.017118444 -0800
+++ new/src/hotspot/share/memory/metaspace.cpp 2017-11-29
14:56:58.657121375 -0800
@@ -3321,9 +3321,6 @@
   MinMetaspaceExpansion = align_down_bounded(MinMetaspaceExpansion,
_commit_alignment);
   MaxMetaspaceExpansion = align_down_bounded(MaxMetaspaceExpansion,
_commit_alignment);

-  CompressedClassSpaceSize = align_down_bounded(CompressedClassSpaceSize,
_reserve_alignment);
-  set_compressed_class_space_size(CompressedClassSpaceSize);
-
   // Initial virtual space size will be calculated at global_initialize()
   size_t min_metaspace_sz =
       VIRTUALSPACEMULTIPLIER * InitialBootClassLoaderMetaspaceSize;
@@ -3341,6 +3338,8 @@
                   min_metaspace_sz);
   }

+  CompressedClassSpaceSize = align_down_bounded(CompressedClassSpaceSize,
_reserve_alignment);
+  set_compressed_class_space_size(CompressedClassSpaceSize);
 }

 void Metaspace::global_initialize() {

Best,
Man

On Wed, Nov 29, 2017 at 3:21 PM, Man Cao <manc@google.com> wrote:

> Hello,
>
> This patch is a follow-up fix for https://bugs.openjdk.java.
> net/browse/JDK-8087291
>
> This patch moves the call to set_compressed_class_space_size() after the
> flag value for CompressedClassSpaceSize is ergo-initialized, fixing the
> issue that the reserved size for compressed class space and metaspace is
> excessively large when MaxMetaspaceSize is set to a small value. More
> discussion about it is available here:
> http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/
> 2017-November/025200.html
>
> This code patch is attached. Could anyone review and/or sponsor this patch?
>
> Best,
> Man
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic