6992998: CMSWaitDuration=0 causes hangs with +ExplicitGCInvokesConcurrent

Closed a timing hole during which concurrent full gc requests can be missed. The hole can increase the latency of the response to a full gc request by up to the value of CMSWaitDuration. If CMSWaitDuration=0 is, as currently, interpreted as an unbounded wait, suitable in certain tuning scenarios, the application can potentially hang. Made two obscure tunables, including CMSWaitDuration, manageable.

Reviewed-by: jcoomes, tonyp
This commit is contained in:
Y. Srinivas Ramakrishna 2010-10-21 17:29:24 -07:00
parent 0c660e1f60
commit 554e77efb4
3 changed files with 16 additions and 9 deletions

View file

@ -120,8 +120,10 @@ class ConcurrentMarkSweepThread: public ConcurrentGCThread {
}
// Wait on CMS lock until the next synchronous GC
// or given timeout, whichever is earlier.
void wait_on_cms_lock(long t); // milliseconds
// or given timeout, whichever is earlier. A timeout value
// of 0 indicates that there is no upper bound on the wait time.
// A concurrent full gc request terminates the wait.
void wait_on_cms_lock(long t_millis);
// The CMS thread will yield during the work portion of its cycle
// only when requested to. Both synchronous and asychronous requests