Request for Review (s) 8026752: Cancel MetaspaceGC request for a CMS concurrent collection after GC
Stefan Johansson
stefan.johansson at oracle.com
Fri May 27 10:47:04 UTC 2016
Hi Jon,
On 2016-05-27 07:46, Jon Masamitsu wrote:
> https://bugs.openjdk.java.net/browse/JDK-8026752
>
> If a concurrent CMS collection has been scheduled for Metaspace
> needs, it should be cancelled if a full GC is done.
>
> http://cr.openjdk.java.net/~jmasa/8026752/webrev.00/
>
> Fix was verified with the new test TestMetaspaceCMSCancel.java
> Stability testing was done with gc_test_suite.
>
I think the fix is good. Just one question regarding where to do the
call. Is there a reason that you have put
MetaspaceGC::set_should_concurrent_collect(false) in
reset_after_compaction()? To me it would make more sense to have the
call in CMSCollector::do_compaction_work(...).
Regarding the test, I think it is a bit unfortunate to have to sleep for
20s to verify this, especially since there have been efforts to shorten
the test-time. What do you think about adding a WhiteBox-method for
checking the value of MetaspaceGC::_should_concurrent_collect and have
the test be something like:
assertTrue(WB.metaspaceShouldConcurrentCollect());
System.gc();
assertFalse(WB.metaspaceShouldConcurrentCollect());
Doing this you should be able to avoid using the process builder as well.
Thanks,
Stefan
> Thanks.
>
> Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20160527/0a43515e/attachment.htm>
More information about the hotspot-gc-dev
mailing list