mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-11 02:48:20 +00:00
8266432: ZGC: GC allocation stalls can trigger deadlocks
Reviewed-by: pliden, ayang
This commit is contained in:
parent
30ccd8081b
commit
ce1bc9d8bc
@ -132,12 +132,8 @@ void ZForwarding::release_page() {
|
||||
|
||||
bool ZForwarding::wait_page_released() const {
|
||||
if (Atomic::load_acquire(&_ref_count) != 0) {
|
||||
ZLocker<ZConditionLock> locker(&_ref_lock);
|
||||
if (_ref_abort) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ZStatTimer timer(ZCriticalPhaseRelocationStall);
|
||||
ZLocker<ZConditionLock> locker(&_ref_lock);
|
||||
while (Atomic::load_acquire(&_ref_count) != 0) {
|
||||
if (_ref_abort) {
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user