Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8141868 | emb-9 | Stefan Karlsson | P2 | Resolved | Fixed | team |
The current implementation to distribute tasks to GC worker threads often cause long latencies when the threads are started stopped.
The main reason is that the worker threads have to fight over the Mutex when they are woken up from the call to Mutex::wait. Another reason is that all worker threads call notify_all when then finish the task, and effectivly waking all sleeping threads, which will yet again force the worker threads to fight over the Mutex.
I propose that we use semaphores instead, so that the worker threads don't have to fight over a lock when they are woken up.
The main reason is that the worker threads have to fight over the Mutex when they are woken up from the call to Mutex::wait. Another reason is that all worker threads call notify_all when then finish the task, and effectivly waking all sleeping threads, which will yet again force the worker threads to fight over the Mutex.
I propose that we use semaphores instead, so that the worker threads don't have to fight over a lock when they are woken up.
- backported by
-
JDK-8141868 Use semaphores when starting and stopping GC task threads
-
- Resolved
-
- blocks
-
JDK-8087340 Shutdown WorkGang GC worker threads
-
- Open
-
- is blocked by
-
JDK-8087323 Unify and split the work gang classes
-
- Resolved
-