JDK-6978641 : Fix for 6929067 introduces additional overhead in thread creation/termination paths
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2010-08-20
  • Updated: 2011-04-23
  • Resolved: 2011-04-23
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 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Related Reports
Relates :  
Description
The fix for 6929067 introduced a check for growable stacks by parsing /proc/self/maps when setting up and tearing down the stack guard pages. This can become a bottleneck when large numbers of threads start or terminate around the same time. Growable stacks are only expected in the main/initial thread as they are not used by the current day threads libraries. We can remove the bottleneck by only checking the stack bounds for the initial thread. But in case of future changes we maintain the existing behaviour in debug mode and add a check that if we find a growable stack that it does indeed belong to the initial thread.

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hsx19/baseline/rev/9b2e416eda7f
08-10-2010

EVALUATION <moved to hs20 sub-CR>
04-09-2010

EVALUATION <moved to hs20 sub-CR>
30-08-2010

EVALUATION <moved to hs20 sub-CR>
27-08-2010

PUBLIC COMMENTS As a data-point on the performance impact of this change I wrote a simple microbenchmark that creates 1024 threads waiting on a CountDownLatch and then releases them. It was run on a 8-way linux box. With this fix in place it took 220ms to run. Without the fix it took 3 seconds!
24-08-2010

EVALUATION See description.
20-08-2010