RFR (XS): JDK-8058967 metaspace/shrink_grow/CompressedClassSpaceSize fails with OOM: Compressed class space
Joseph Provino
joseph.provino at oracle.com
Sat May 16 16:15:10 UTC 2015
Here is the updated webrev:
http://cr.openjdk.java.net/~jprovino/8058967/webrev.01
thanks.
joe
On 5/15/2015 4:35 PM, Kim Barrett wrote:
> On May 15, 2015, at 3:16 PM, Joseph Provino <joseph.provino at oracle.com> wrote:
>> On 5/15/2015 2:29 PM, Jon Masamitsu wrote:
>>> I think the statement of the policy should be updated.
>> How does this sound? Should the comment be with the "if" statement or
>> where _small_chunk_limit is declared?
>>
>> /*
>> * The policy is to allocate up to _small_chunk_limit small chunks
>> * after which only medium chunks are allocated. This is done to
>> * reduce fragmentation. In some cases, this can result in a lot
>> * of small chunks being allocated to the point where it's not
>> * possible to expand. If this happens, there may be no medium chunks
>> * available and OOME would be thrown. Instead of doing that,
>> * if the allocation request size fits in a small chunk, an attempt
>> * is made to allocate a small chunk.
>> */
>> if (next == NULL &&
>> word_size + Metachunk::overhead() <= small_chunk_size() &&
>> grow_chunks_by_words == medium_chunk_size()) {
>> /*
>> * There are no medium chunks available but a small chunk is big enough.
>> * See if a small chunk is available.
>> */
>> next = get_new_chunk(word_size, small_chunk_size());
>> }
>>
> After further consideration and offline discussion, I'm ok with this
> approach. There are several open CRs to improve metaspace allocation,
> some of which might render this change moot. However, as a short term
> fix for an intermittently failing test, this seems ok.
>
> So the above version looks good to me.
>
> https://bugs.openjdk.java.net/browse/JDK-8076476
> Coalesce Metachunks in the Metaspaces
>
> https://bugs.openjdk.java.net/browse/JDK-8035945
> Small Metaspace allocation requests can fail even though SmallChunks are available
> This might be a duplicate of 8058967.
>
More information about the hotspot-gc-dev
mailing list