-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove coordinator and support forking #1067
Conversation
Found a case where workers may sleep forever. Need to be fixed later.
Mutators no longer trigger GC by adding ScheduleCollection directly.
They are now too complex and should be put in dedicatd files.
The change is unnecessary because GC workers now use the active goal to determine what to do when the last worker parked.
Also made `park_and_wait` method more testable.
I have gone through my changes and updated stale comments. I also added some unit tests. I think I have addressed all comments except (1) some assertions about I am doing performance evaluation again on vole.moma to check if any recent changes introduced any performance problem. The result will come out this evening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks! The only thing I'm concerned about is how the additional complexity in the scheduler affects @wenyuzhao's work packet/scheduler redesign. I presume PRs for OpenJDK and other bindings to remove the coordinator thread will follow? Also could you fix the typos I highlighted in a previous review?
The result. On The result shows an average 2% reduction in total time across the five different plans, where GenImmix has a 4% reduction and SemiSpace has a 0.5% reduction in total time. The results in #1062 only shows a moderate 0.5% improvement on average. I can't explain this difference now, but I'll verify the result on a different machine. |
Here are the results from two other machines. They use the identical binary and running script as vole.moma, except I slightly modified the running script to use lynx.moma (using fisher.moma: (plotty) These results are similar. The reduction in total time is noticeable for generational plans, but insignificant for non-generational ones. The total time improvement on lynx and fisher is not as significant as vole.moma. |
The extended-tests-openjdk CI test failed because it hung while triggering the first GC when running antlr from DaCapo 2006 using MarkSweep. However, I can't reproduce this locally. JikesRVM failed for "Failing instruction starting at f797b0a1 wasn't in RVM address space". I restarted those tests. |
The OpenJDK binding test failed again because it still got stuck while running MarkSweep. I managed to reproduce it locally. In let cell_size = self.load_block_cell_size(); // This sometimes returns 0.
let mut cell = self.start();
// ...
while cell + cell_size <= self.start() + Block::BYTES {
// ...
cell += cell_size; // If `cell_size` is 0, this loop will go on forever.
} It is likely an unrelated bug, and I'll report it in a separate issue and try to find the cause later. Update: It is reproducible on the master branch, so the bug already existed before this PR. |
Upstream PR: mmtk/mmtk-core#1067 --------- Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
Upstream PR: mmtk/mmtk-core#1067 --------- Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
Upstream PR: mmtk/mmtk-core#1067 --------- Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
Upstream PR: mmtk/mmtk-core#1067 --------- Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
Upstream PR: mmtk/mmtk-core#1067 --------- Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
MMTk PR: mmtk/mmtk-core#1067 Change-Id: I316728aeefd0127b5d1fc1d85e464062cc629aa8
This PR removes the coordinator (a.k.a. controller) thread, and allows temporarily terminating and restarting all GC worker threads in order to support forking.
Major changes include:
GCController
is removed. All synchronization mechanisms involving the controller are removed, too. Important synchronization operations, such as opening buckets and declaring GC finished, are done by the last parked worker. The work packetEndOfGC
is removed, and its job is now done by the last parked worker.WorkerMonitor
, which previously synchronizes between GC workers, now also synchronizes between mutators and GC workers. This allows mutators to trigger GC by directly communicating with GC workers.MMTK::prepare_to_fork()
andMMTK::after_fork()
. VM bindings call them before and after forking to let the MMTK instance do proper preparation for forking.Fixes: #1053
Fixes: #1054