Skip to content

GC CRIU: Reinit HeapRegionDescriptorExtensions (Region Obj Lists) - #17614

Merged
amicic merged 1 commit into
eclipse-openj9:masterfrom
RSalman:reinit-region
Jun 21, 2023
Merged

GC CRIU: Reinit HeapRegionDescriptorExtensions (Region Obj Lists)#17614
amicic merged 1 commit into
eclipse-openj9:masterfrom
RSalman:reinit-region

Conversation

@RSalman

@RSalman RSalman commented Jun 16, 2023

Copy link
Copy Markdown
Contributor

HeapRegionDescriptorExtensions contain multiple array of obj lists which are inited at startup based on the startup thread count. These must be reinitialized during restore (CRIU) according to the new GC thread
count. Specifically, when the thread count is increased, it is necessary to divide the region object lists. This is required to improve parallelism with GC threads and ultimately improve GC performance for the restore environment. For background, see eclipse-omr/omr#6888 (Compensate for Thread Count Change).

Signed-off-by: Salman Rana salman.rana@ibm.com

@RSalman
RSalman force-pushed the reinit-region branch 3 times, most recently from b4ac4d5 to b65dfd0 Compare June 16, 2023 20:18
@RSalman

RSalman commented Jun 16, 2023

Copy link
Copy Markdown
Contributor Author

@amicic could you please have a look

@dmitripivkine dmitripivkine added comp:gc criu Used to track CRIU snapshot related work labels Jun 19, 2023
RSalman added a commit to RSalman/omr that referenced this pull request Jun 19, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
Comment thread runtime/gc_base/ContinuationObjectList.cpp Outdated
Comment thread runtime/gc_base/ContinuationObjectList.cpp Outdated
@RSalman
RSalman requested a review from amicic June 19, 2023 20:42
RSalman added a commit to RSalman/omr that referenced this pull request Jun 19, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
Comment thread runtime/gc_glue_java/HeapRegionDescriptorStandardExtension.hpp Outdated
@RSalman
RSalman force-pushed the reinit-region branch 2 times, most recently from b1e0cdc to c724f86 Compare June 19, 2023 22:58
@RSalman
RSalman requested a review from amicic June 19, 2023 23:03
Comment thread runtime/gc_glue_java/HeapRegionDescriptorStandardExtension.hpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not setting ref list to null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no global ref list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is global referenceObjectLists but only used for Metronome. for completeness, I'd clear it here, as well

i did notice that it was never cleared in its constructor. while there to clear it, put referenceObjectLists and unfinalizedObjectLists next to each other

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no global ref list

Ahh yes there is! I assumed not because its never built while initing the lists (like the other 3 lists)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify what you mean by

i did notice that it was never cleared in its constructor. while there to clear it, put referenceObjectLists and unfinalizedObjectLists next to each other

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in MM_GCExtensions referenceObjectLists is declared by never inited/cleared. actually, not just that one, but a few other fileds

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 4 ObjectLists fields are scattered in that structure. would be nice to have them next to each other

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also start incrementally prepending '_' to those fields in Extensions/ExtensionsBase, but if that would require a lot more file to touch (just to fix those 4), you can ignore it

@RSalman
RSalman force-pushed the reinit-region branch 2 times, most recently from 9e63614 to 57ba037 Compare June 20, 2023 18:25
@RSalman
RSalman requested a review from amicic June 20, 2023 18:26
Comment thread runtime/gc_base/ContinuationObjectList.cpp Outdated
RSalman added a commit to RSalman/omr that referenced this pull request Jun 20, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
HeapRegionDescriptorExtensions contain multiple array of obj lists which
are inited at startup based on the startup thread count. These must be
reinitialized during restore (CRIU) according to the new GC thread
count. Specifically, when the thread count is increased, it is necessary
to divide the region object lists. This is required to improve
parallelism with GC threads and ultimately improve GC performance for
the restore environment. For background, see
eclipse-omr/omr#6888 (Compensate for Thread Count
Change).

Signed-off-by: Salman Rana <salman.rana@ibm.com>
@amicic

amicic commented Jun 20, 2023

Copy link
Copy Markdown
Contributor

jenkins test sanity aix jdk11

@amicic

amicic commented Jun 20, 2023

Copy link
Copy Markdown
Contributor

jenkins test sanity xlinuxcriu jdk17

@amicic

amicic commented Jun 20, 2023

Copy link
Copy Markdown
Contributor

jenkins compile win32 jdk8

@amicic

amicic commented Jun 20, 2023

Copy link
Copy Markdown
Contributor

jenkins test sanity win jdk11

@amicic
amicic merged commit ba637b2 into eclipse-openj9:master Jun 21, 2023
for (uintptr_t index = 0; index < arrayElements; index++) {
Assert_MM_true(arrayElementsTotal >= arrayElementsToCopy);
/* Check whether a new array instance in being created from an existing array. If so, copy over the elements first. */
if (arrayElementsToCopy > 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this a number of places: what the point of if statements like the one here? If arrayElementsToCopy == 0, the for loop won't execute.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, could be removed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed as part of #17629

RSalman added a commit to RSalman/omr that referenced this pull request Jun 22, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
RSalman added a commit to RSalman/omr that referenced this pull request Jun 22, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
RSalman added a commit to RSalman/omr that referenced this pull request Jul 5, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
RSalman added a commit to RSalman/omr that referenced this pull request Jul 5, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
RSalman added a commit to RSalman/omr that referenced this pull request Jul 5, 2023
Integrate with downstream OpenJ9 restore reinit APIs:

- Thread Local (env) Obj Buffers
- Region Extensions Object Lists

Depends on eclipse-openj9/openj9#17614

Signed-off-by: Salman Rana <salman.rana@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:gc criu Used to track CRIU snapshot related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants