This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
Minor GC: restrict global roots scanning to one domain #463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, all live domains scan all the global roots during a minor collection. This patch restricts the global root scanning in minor GC to just one domain. The first domain to reach the scanning part carries on the scanning, with a lock around it. Once it is done, a flag is updated, which indicates that other domains need not scan the global roots.
This is of the patches addressing #424.
The sequential and parallel macro benchmark results for this, are below.
Sequential - Normalised time
Parallel - Time
Results for the Global roots parallel micro benchmark
globroots_mp.ml
with10000
roots from ocaml-bench/sandmark#200:There is no huge difference between the two branches, this could be due to overheads lying elsewhere.
Examining the eventlogs produced by produce by the same microbenchmark on 12 domains (for a representative value), the event
minor_gc/global_roots
was found 68081 times inparallel_minor_gc
and only 5983 times with this patch.