-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement Julia GC Heuristics for v1.9.2 #133
Conversation
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.
} | ||
} | ||
|
||
let live_bytes = conversions::pages_to_bytes(reserved_pages_now); |
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.
Could we use the count_live_bytes_in_gc
feature and have a fairer comparison with stock Julia? Not that we want to do that necessarily, just wondering if it's as simple as that. I'm also wondering how much their heuristics are dependent on the live bytes instead of live pages.
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.
Basically the heuristics use these stats: live bytes/pages, allocated bytes/pages, and freed bytes/pages. We can replace live pages with live bytes in the implementation, but we do not have allocated bytes and freed bytes. I don't think it is a good idea to use live bytes with other page-granularity stats.
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.
Also I listed the difference between this implementation and the stock Julia's heuristics here:
mmtk-julia/mmtk/src/gc_trigger.rs
Lines 18 to 30 in e5e1db6
/// This tries to implement Julia-style GC triggering heuristics. However, it is still siginificantly different | |
/// from the Julia's GC heuristics. | |
/// 1. Julia counts allocation per thread and compares with a per-thread interval, while this impl counts global | |
/// allocation and compares that with an estimated global interval. For Julia, the first thread that allocates | |
/// the amount of bytes that exceeds the interval will trigger a GC. For us, as MMTk does not count allocation | |
/// per thread, we calculate an estiamted global interval (using thread interval * n_mutator / 2), and compare | |
/// global allocation with it. | |
/// 2. Julia makes the decision of full heap GC after marking and before sweeping (they call it full sweep), while | |
/// MMTk makes such decisions before a GC. So for us, we use Julia's decision, but force a full heap GC in the next | |
/// next GC (not the current one). | |
/// 3. Julia counts the pointers in the remembered set, and if the remembered set is too large (large_frontier), | |
/// they will do full heap GC. MMTk does not collect such information about remembered set, so we do not have the heuristic | |
/// based on the remembered set. |
No description provided.