aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-04-12 11:33:01 +0200
committerRickard Green <[email protected]>2017-04-12 11:33:01 +0200
commit8e2e8a5f813874134a601db551f2b4d5bb0abec5 (patch)
tree95db342233895f432091f30c58ae87c29eaae318 /erts/emulator/beam/erl_gc.c
parent85c956da8303096bba8c5c2307aa07d6e007f620 (diff)
parentb5cd902c38687b9578d2222ace7956fdb26c9401 (diff)
downloadotp-8e2e8a5f813874134a601db551f2b4d5bb0abec5.tar.gz
otp-8e2e8a5f813874134a601db551f2b4d5bb0abec5.tar.bz2
otp-8e2e8a5f813874134a601db551f2b4d5bb0abec5.zip
Merge branch 'rickard/ds-fixes'
* rickard/ds-fixes: Fix dirty GC implementation Fix multi-scheduling with only one normal scheduler Fix +SDPcpu
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 50805d9cd9..d51d4fff45 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -479,9 +479,15 @@ delay_garbage_collection(Process *p, ErlHeapFragment *live_hf_end, int need, int
p->live_hf_end = live_hf_end;
}
- if (need == 0)
+ if (need == 0) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (p->flags & (F_DIRTY_MAJOR_GC|F_DIRTY_MINOR_GC)) {
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(erts_proc_sched_data(p)));
+ goto force_reschedule;
+ }
+#endif
return 1;
-
+ }
/*
* Satisfy need in a heap fragment...
*/
@@ -534,6 +540,10 @@ delay_garbage_collection(Process *p, ErlHeapFragment *live_hf_end, int need, int
p->heap_hfrag = hfrag;
#endif
+#ifdef ERTS_DIRTY_SCHEDULERS
+force_reschedule:
+#endif
+
/* Make sure that we do a proper GC as soon as possible... */
p->flags |= F_FORCE_GC;
reds_left = ERTS_REDS_LEFT(p, fcalls);