Remove the immix_stress_copying feature. Replace with separate options.#1324
Conversation
immix_defrag_every_block
dbf67eb to
a2682e4
Compare
a2682e4 to
66eef3b
Compare
| One way to make copying more deterministic is to use the following options to | ||
| change the copying behavior of Immix. |
There was a problem hiding this comment.
If the reader is new to MMTk, they may wonder how to set options. Providing a link to mmtk::util::options::Options should be helpful. We can also add some examples that set the options by setting environment variables.
| /// Mark every allocated block as defragmentation source before GC. (for debugging) | ||
| immix_defrag_every_block: bool [always_valid] = false, | ||
| /// Percentage of heap size reserved for defragmentation. | ||
| /// According to [this paper](https://doi.org/10.1145/1375581.1375586), Immix works well with | ||
| /// headroom between 1% to 3% of the heap size. | ||
| immix_defrag_headroom_percent: usize [|v: &usize| *v <= 50] = 2 |
There was a problem hiding this comment.
Merely setting immix_defrag_every_block = true will make it run out of headroom before copying every live object. We should mention, in either immix_defrag_every_block or immix_defrag_headroom_percent or both, that we need to set immix_defrag_headroom_percent = 50 if we want to stress copying. We can also provide a link to the porting guide.
There was a problem hiding this comment.
This is a good point. So setting immix_defrag_every_block to true alone does not make sense.
What if we set the defrag headroom to 50% but we do not set immix_defrag_every_block? I assume the defrag also works, as it will still defrag enough blocks (which should be all the blocks) to use the headroom.
I am wondering if we really need an option for immix_defrag_every_block.
|
I have made changes to address the reviews. Can you take a look again? @wks |
wks
left a comment
There was a problem hiding this comment.
LGTM.
The mmtk-ruby binding currently has a feature named immix_stress_copying which is just a wrapper of the mmtk-core feature fo the same name. I'll remove it from mmtk-ruby once this PR is merged.
The feature of the same name has been removed in mmtk-core. See: mmtk/mmtk-core#1324
immix_stress_copyingmay cause confusion with the stress GC and the stress factor, asimmix_stress_copyingdoes not imply stress GCs. This PR removesimmix_stress_copying, and replaces with separate options to control the specific behavior.