mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8043630: Method os::yield_all() should be removed
Reviewed-by: dholmes, dsimms
This commit is contained in:
parent
d9a2dbc73b
commit
5507f2b476
9 changed files with 9 additions and 58 deletions
|
@ -264,8 +264,8 @@ void SafepointSynchronize::begin() {
|
|||
//
|
||||
// Further complicating matters is that yield() does not work as naively expected
|
||||
// on many platforms -- yield() does not guarantee that any other ready threads
|
||||
// will run. As such we revert yield_all() after some number of iterations.
|
||||
// Yield_all() is implemented as a short unconditional sleep on some platforms.
|
||||
// will run. As such we revert to naked_short_sleep() after some number of iterations.
|
||||
// nakes_short_sleep() is implemented as a short unconditional sleep.
|
||||
// Typical operating systems round a "short" sleep period up to 10 msecs, so sleeping
|
||||
// can actually increase the time it takes the VM thread to detect that a system-wide
|
||||
// stop-the-world safepoint has been reached. In a pathological scenario such as that
|
||||
|
@ -322,9 +322,7 @@ void SafepointSynchronize::begin() {
|
|||
if (steps < DeferThrSuspendLoopCount) {
|
||||
os::NakedYield() ;
|
||||
} else {
|
||||
os::yield_all() ;
|
||||
// Alternately, the VM thread could transiently depress its scheduling priority or
|
||||
// transiently increase the priority of the tardy mutator(s).
|
||||
os::naked_short_sleep(1);
|
||||
}
|
||||
|
||||
iterations ++ ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue