RFR: 8328235: GenShen: Robustify ShenandoahGCSession and fix missing use [v4]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Tue May 28 13:05:24 UTC 2024
On Thu, 23 May 2024 21:40:38 GMT, William Kemper <wkemper at openjdk.org> wrote:
> Left a few minor coding suggestings. On a higher level, it's not clear to me when and which threads should use `gc_generation` or `active_generation`. I gather that active_generation is set on the safepoint and `gc_generation` is set by control thread, does that mean any code before `init-mark` needs to use `gc_generation`?
Thanks for the review. I'll make the suggested changes and respond individually to the feedback.
As regards, `gc_generation` vs `active_generation`, the intention is that only the load-reference-barrier and the mutator threads use `active_generation` and the GC worker threads use `gc_generation` (unless executing the load-reference-barrier). The idea is that the LRB's notion of an active generation cannot be updated safely except at a safepoint. I suspect this splitting of roles still presents a problem when evacuations occur during mixed collections. So there is likely more work to do to clean up the two roles.
More generally, `gc_generation` is tightly controlled by scopes by the coordinator thread, and indicate the generation that GC worker threads are dealing with at any time, except during evacuation/update-refs when the load-reference-barrier uses the active_generation.
I suspect there is still some badness or mix-ups in these LRB paths that is leading to issues that need to be resolved (there are some failures since a recent merge that I am yet to resolve).
Once I am done with those, I hope to have a cleaner solution.
Meanwhile, I am going to go over your suggestions and make the changes stemming from them.
-------------
PR Comment: https://git.openjdk.org/shenandoah/pull/407#issuecomment-2135165180
More information about the shenandoah-dev
mailing list