RFR (S): 8067339: PLAB reallocation might result in failure to allocate object in that recently allocated PLAB

Thomas Schatzl thomas.schatzl at oracle.com
Fri Aug 14 09:10:51 UTC 2015


Hi Mikael,

On Fri, 2015-08-14 at 10:42 +0200, Mikael Gerdin wrote:
> Hi Thomas,
> 
> On 2015-08-14 10:29, Thomas Schatzl wrote:
> > Hi all,
> >
> >    can I have reviews for the following small fix: if G1 reallocates a
> > PLAB for an object of size X, it allocates a new PLAB of size Y.
> >
> > PLABs are required to contain enough space for the object plus some
> > alignment reserve; so if X >= Y - alignment-reserve, G1 failed to
> > allocate this object it just allocated the PLAB for into that PLAB,
> > resulting in an evacuation failure although there is actually enough
> > space.
> >
> > As far as I know this has been a rare occurrence until now because
> > current PLAB sizing tended to maximize PLAB sizes, and it is rare to
> > have such large objects, but with future changes that actually try to
> > size the PLABs so that the expected waste is kept, I noticed a few cases
> > of that issue occurring. So this needs to be fixed.
> >
> > The fix is to consider the required alignment reserve in the PLAB
> > allocation request.
> >
> > This is a day one G1 bug.
> >
> > CR:
> > https://bugs.openjdk.java.net/browse/JDK-8067339
> > Webrev:
> > http://cr.openjdk.java.net/~tschatzl/8067339/webrev/
> 
> Looks good to me.

Thanks for the review.

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list