Request for review (s) 8025635: SoftReferences are not cleared before metaspace OOME are thrown

Jon Masamitsu jon.masamitsu at oracle.com
Thu Oct 17 13:22:19 UTC 2013


Thanks.

Jon

On 10/17/2013 5:55 AM, Stefan Karlsson wrote:
>
> On 2013-10-16 22:56, Jon Masamitsu wrote:
>> I've fixed the CMS case and updated the webrev.
>>
>> http://cr.openjdk.java.net/~jmasa/8025635/webrev.01/
>
> Looks good.
>
> StefanK
>
>>
>> With the fix an unneeded call to expand_and_allocate() may be
>> made for CMS.  I chose to keep the code simpler rather
>> than to treat that CMS case.
>>
>> While working on this change I decided that a CMS concurrent
>> cycle could be started inappropriately (after a STW full GC or
>> after a foreground CMS collection) and have filed
>>
>> 8026752: Cancel MetaspaceGC request for a concurrent collection after GC
>>
>> See that CR for comments on the CMS behavior regarding collections for
>> Metaspace allocations.
>>
>> Jon
>>
>>
>> On 10/3/13 3:44 PM, Jon Masamitsu wrote:
>>> 8025635: SoftReferences are not cleared before metaspace OOME are 
>>> thrown
>>>
>>> If native memory has been exhausted or MaxMetaspaceSize has been set 
>>> and
>>> has been reached, a GC will be done to try and unload classes and 
>>> free metadata
>>> space.  If not enough metadata space has been freed, another GC 
>>> which clears
>>> SoftReferences will be done.
>>>
>>> Note that GC's are normally done to unload classes and free metadata 
>>> space.
>>> If not enough metadata space is freed by the GC, additional
>>> space is allocated and used for the metadata allocation.  It is only in
>>> the situation where no additional native memory can be allocated for
>>> metadata that SoftReferences are cleared.
>>>
>>> http://cr.openjdk.java.net/~jmasa/8025635/webrev.00/ 
>>
>
>




More information about the hotspot-gc-dev mailing list