JDK-8134857 : Inconsistency in maximum TLAB/PLAB size and humonguous object size
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-09-01
  • Updated: 2015-11-09
  • Resolved: 2015-09-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b83Fixed
Related Reports
Relates :  
Description
In G1CollectedHeap::max_tlab_size(), the maximum TLAB size is defined as

  align_size_down(_humongous_object_threshold_in_words - 1, MinObjAlignment);

but G1CollectedHeap::is_humongous(size_t word_size) determines humonguous objects as

  word_size > _humongous_object_threshold_in_words

Which means that G1CollectedHeap::max_tlab_size() is actually one word too small.

Also _filler_array_max_size is equal to _humongous_object_threshold_in_words (not -1), so that "- 1" seems some arbitrary difference.

This is very annoying with JDK-8078555 now checking these requirements, and the user wanting to set half region size as PLAB/TLAB size. :)