Skip to content

Commit 8e6dcbb

Browse files
authored
Revert "Fix GC pacing problem exacerbated by mark-delay (#3331)"
This reverts commit aded4b5.
1 parent 39d916f commit 8e6dcbb

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

runtime/major_gc.c

-21
Original file line numberDiff line numberDiff line change
@@ -755,27 +755,6 @@ static void update_major_slice_work(intnat howmuch,
755755
atomic_fetch_add (&work_counter, dom_st->major_work_done_between_slices);
756756
dom_st->major_work_done_between_slices = 0;
757757
atomic_fetch_add (&alloc_counter, new_work);
758-
759-
/* If the work_counter is falling far behind the alloc_counter,
760-
* artificially catch up some of the difference. This is a band-aid
761-
* for general GC pacing problems revealed by the mark-delay changes
762-
* (see comments on ocaml/ocaml PR #13580): when we rework the
763-
* pacing this should go away. */
764-
int64_t pending = diffmod(atomic_load(&alloc_counter),
765-
atomic_load(&work_counter));
766-
if (pending > (int64_t)total_cycle_work * 2) {
767-
intnat catchup = pending - total_cycle_work;
768-
caml_gc_message(0x40,
769-
"work counter %"ARCH_INTNAT_PRINTF_FORMAT"u falling behind "
770-
"alloc counter %"ARCH_INTNAT_PRINTF_FORMAT"u by more than "
771-
"twice a total cycle's work %"ARCH_INTNAT_PRINTF_FORMAT"d; "
772-
"catching up by %"ARCH_INTNAT_PRINTF_FORMAT "d\n",
773-
atomic_load(&work_counter),
774-
atomic_load(&alloc_counter),
775-
total_cycle_work, catchup);
776-
atomic_fetch_add (&work_counter, catchup);
777-
}
778-
779758
if (howmuch == AUTO_TRIGGERED_MAJOR_SLICE ||
780759
howmuch == GC_CALCULATE_MAJOR_SLICE) {
781760
dom_st->slice_target = atomic_load (&alloc_counter);

0 commit comments

Comments
 (0)