diff options
author | Erlang/OTP <[email protected]> | 2019-04-16 16:37:36 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2019-04-16 16:37:36 +0200 |
commit | 303e28414ac6db42219e5dcea382cb60d682e748 (patch) | |
tree | ba15df668e1e5538c92082b123b4a57b0d5eea1c | |
parent | 65391703e04624539d174cb810c2af7b23b001f6 (diff) | |
parent | f16f18f0378fce45f2dec3a5dadc0340e81090a8 (diff) | |
download | otp-303e28414ac6db42219e5dcea382cb60d682e748.tar.gz otp-303e28414ac6db42219e5dcea382cb60d682e748.tar.bz2 otp-303e28414ac6db42219e5dcea382cb60d682e748.zip |
Merge branch 'max-au/erts/maint-20/dirty_scheduler_shutdown/PR-2172/OTP-15690' into maint-20
* max-au/erts/maint-20/dirty_scheduler_shutdown/PR-2172/OTP-15690:
erts: Use smp prefix on runq
erts: release dirty runqueue lock before entering endless loop when BEAM is shutting down
-rw-r--r-- | erts/emulator/beam/erl_process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 6779d9f218..be94418755 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -10550,6 +10550,7 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls) if (!is_normal_sched & !!(flags & ERTS_RUNQ_FLG_HALTING)) { /* Wait for emulator to terminate... */ + erts_smp_runq_unlock(rq); while (1) erts_milli_sleep(1000*1000); } @@ -14593,12 +14594,12 @@ void erts_halt(int code) if (-1 == erts_smp_atomic32_cmpxchg_acqb(&erts_halt_progress, erts_no_schedulers, -1)) { + notify_reap_ports_relb(); #ifdef ERTS_DIRTY_SCHEDULERS ERTS_RUNQ_FLGS_SET(ERTS_DIRTY_CPU_RUNQ, ERTS_RUNQ_FLG_HALTING); ERTS_RUNQ_FLGS_SET(ERTS_DIRTY_IO_RUNQ, ERTS_RUNQ_FLG_HALTING); #endif erts_halt_code = code; - notify_reap_ports_relb(); } } |