The expected complexity for completely draining a long list
can be reduced from quadratic to linear time when the
contention is low. The current code causes quadratic
complexity even when there is no contention for the overflow list.
Should check other collectors to see if the same problem
exists in any of the other collectors (in particular ParNew
which also uses overflow lists in somewhat similar fashion).
Preliminary shape of the changes (by no means final):-
The same problem exists in ParNew and CMS. A patch for the fix
has been generated and performance tests are currently in progress
to assess the impact in low contention and high contention scenarios.
(Some policy tweaks may be necessary once initial performance
numbers are in.)
A test binary will be made available for performance testing by customer.