JDK-6445193 : Revisit GC / app thread interaction in CMS during GC yielding
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 6,6u17
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic,linux
  • CPU: generic,x86
  • Submitted: 2006-06-29
  • Updated: 2019-12-14
  • Resolved: 2019-12-14
Related Reports
Relates :  
Relates :  
Description
The original problem, reported in 6442774, was that after a GC thread yields, the mutator thread that requested the yield might not get a chance to run and actually did what it needed to do. Therefore, the GC thread could complete the yield without the requesting mutator thread actually doing what it needed to do. This could cause the mutator thread to be blocked for a long time and the GC thread doing frequent yields, which slowed it down.

The fix for 6442774 was conservative and causes the GC thread to sleep while looping for a period of time, while waiting for the mutator thread to wake up. A better fix will be to improve the interaction between yielding GC and mutator threads by using wait/notify.

Comments
CMS has been removed - JDK-8229049
14-12-2019

WORK AROUND -XX:-CMSConcurrentMTEnabled is a fragile workaround and may not work well on all platforms.
09-02-2010

EVALUATION Yes.
09-02-2010