diff options
author | John Högberg <[email protected]> | 2018-11-30 10:47:23 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-11-30 10:47:23 +0100 |
commit | ae799c9de1b24d7def2a84172a5740ac9a5d6595 (patch) | |
tree | 8f1cc89e65caab9c70ba0f7ced9996f0824ffb5a /erts/emulator | |
parent | 336b54dbc87a8a9bc661b667544144b8dcfd26ba (diff) | |
parent | 106158baac95a886d8c4e3f3133fabc7d4a9695f (diff) | |
download | otp-ae799c9de1b24d7def2a84172a5740ac9a5d6595.tar.gz otp-ae799c9de1b24d7def2a84172a5740ac9a5d6595.tar.bz2 otp-ae799c9de1b24d7def2a84172a5740ac9a5d6595.zip |
Merge branch 'john/erts/assert-dirty-aux-work'
* john/erts/assert-dirty-aux-work:
Abort when aux work runs on a dirty scheduler
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index a21acb9a57..1dde9800f8 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -3284,7 +3284,12 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq) ErtsMonotonicTime current_time = 0; aux_work = erts_atomic32_read_acqb(&ssi->aux_work); - if (aux_work && !ERTS_SCHEDULER_IS_DIRTY(esdp)) { + + if (aux_work && ERTS_SCHEDULER_IS_DIRTY(esdp)) { + ERTS_INTERNAL_ERROR("Executing aux work on a dirty scheduler."); + } + + if (aux_work) { if (!thr_prgr_active) { erts_thr_progress_active(esdp, thr_prgr_active = 1); sched_wall_time_change(esdp, 1); @@ -3296,16 +3301,14 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq) } if (aux_work) { - if (!ERTS_SCHEDULER_IS_DIRTY(esdp)) { - flgs = erts_atomic32_read_acqb(&ssi->flags); - current_time = erts_get_monotonic_time(esdp); - if (current_time >= erts_next_timeout_time(esdp->next_tmo_ref)) { - if (!thr_prgr_active) { - erts_thr_progress_active(esdp, thr_prgr_active = 1); - sched_wall_time_change(esdp, 1); - } - erts_bump_timers(esdp->timer_wheel, current_time); + flgs = erts_atomic32_read_acqb(&ssi->flags); + current_time = erts_get_monotonic_time(esdp); + if (current_time >= erts_next_timeout_time(esdp->next_tmo_ref)) { + if (!thr_prgr_active) { + erts_thr_progress_active(esdp, thr_prgr_active = 1); + sched_wall_time_change(esdp, 1); } + erts_bump_timers(esdp->timer_wheel, current_time); } } else { |