RFR: 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit

Stefan Johansson stefan.johansson at oracle.com
Thu Jan 8 17:59:45 UTC 2015


Sorry for doing a re-spin on this, but since this is targeted to go into 
8 as well I want to minimize the risk of introducing a regression.

After yesterdays comments I started thinking more about what regressions 
this fix might cause and today I've had good discussions with Thomas and 
Mikael. I've also did some quick measurements that shows additional time 
for the YCs expanding the heap after a shrink. Since we don't really 
need the heap regions to be cleared I think we need to avoid this 
regression, by going with another solution and I don't think having this 
time added to the full GC shrinking the heap is wanted either.

The first proposal that is explained in the bug-report would avoid 
clearing memory that don't have to be cleared, but just doing the simple 
solution explained there might cause startup regressions due to touching 
memory during startup that isn't needed. Mixing that approach with the 
one proposed yesterday will allow us to only clear memory when 
absolutely needed. See new webrev here:

This approach leaves the clearing to the listener registered with each 
mapper and for the bitmaps this will make sure that they are cleared, 
but for the heap we won't do anything (because the heap has no 
requirement of having zeroed backing memory).


On 2015-01-07 16:14, Stefan Johansson wrote:
> Hi,
> Please review this fix for:
> https://bugs.openjdk.java.net/browse/JDK-8062063
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8062063/hotspot.00
> Summary:
> When using large pages on Linux we never actually uncommit memory, we 
> just mark it as currently not used. When later re-committing those 
> pages we currently only mark them in use again. This works fine until 
> someone expects to get cleared memory back when doing a commit, which 
> for example is expected for the memory backing certain bitmaps. This 
> fix, makes sure that we always clear large pages when they are 
> re-committed.
> Testing:
> * Built via JPRT
> * Verified fix on failing reproducer
> * Planning to run longer aurora-run.
> Thanks,
> Stefan

More information about the hotspot-gc-dev mailing list