RFR: 8158871: Long response times with G1 and StringDeduplication
per.liden at oracle.com
Mon Jun 13 10:19:57 UTC 2016
Could I please have a couple of reviews in this bug fix.
Summary: When entries are pruned from the StringDedupTable, the actual
freeing of those entries are done while both holding the
StringDedupTable_lock and being joined to the SuspendibleThreadSet. This
causes both String.intern() and safepoints to be blocked until the
freeing is completed. As described in the bug report, this can cause a
very noticeable hick up in application response times when a huge amount
(millions) of entries are pruned at once. The patch fixes this by moving
all freeing out from the StringDedupTable_lock and the
SuspendibleThreadSet is only joined temporarily to bulk-extract the list
of entries to free, which is an O(1) operation.
Testing: All jtreg string dedup tests pass. Manually provoked the
problematic condition and verified that the actual freeing of entries
doesn't block safepoints or String.intern().
More information about the hotspot-gc-dev