Skip to content

SATB TLH Batch Mark - #6388

Merged
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
RSalman:master
Apr 19, 2022
Merged

0xdaryl merged 1 commit into
eclipse-omr:masterfrom
RSalman:master

Conversation

@RSalman

@RSalman RSalman commented Mar 4, 2022 •

Copy link
Copy Markdown

Objects allocated while CM (SATB) is active must be marked to preserve
the invariant required to guarantee correctness.

Instead of marking each obj individually, we can mark on the TLH level.
However, doing so is non-trivial: we must know the start of the last
object to mark the proper range of the TLH. That is, arbitrary bits at
the end of the TLH can't be marked, and this is problematic for sweep.

To get around this issue we seal the TLH with a bogus/dummy obj at the
end of the TLH. With this, we know the precise addr to mark up to.
However, we must guarantee that we have at least min obj size available
in the TLH.

These changes introduce a mechanism for the collector to reserve bytes
in a TLH. Whenever the TLH is refreshed, it queries the collector to
determine if it should reserve space for it. If so, part of TOP of the
TLH is hidden. Once the TLH is about to be flushed/cleared, we restore
the the TLH Top and notify the collector.

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

@RSalman

RSalman commented Mar 4, 2022 •

Copy link
Copy Markdown
Author

@amicic @dmitripivkine please review.

This is TLH post-batch mark, ideally we're looking to do "pre-batch". Will follow up these changes with converting to pre-batch style. I'm more comfortable doing the changes incrementally as I've done all testing with this style.

Comment thread gc/base/standard/ConcurrentGCSATB.hpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
Comment thread gc/base/TLHAllocationSupport.hpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
Comment thread gc/base/MarkingScheme.cpp Resolved
RSalman pushed a commit to RSalman/openj9 that referenced this pull request Mar 9, 2022
- Implementation to seal TLH with java.lang.Object. (Relates to:
eclipse-omr/omr#6388)

- Inline allocation path to account for SATB allocation (pre write
barrier might scan newly alloced obj  object - always zero it with SATB)


Signed-off-by: Salman Rana <salman.rana@ibm.com>
@RSalman
RSalman force-pushed the master branch 4 times, most recently from be5bf26 to 8282b7b Compare March 9, 2022 21:24
Comment thread gc/base/GlobalCollector.hpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
@amicic

amicic commented Apr 5, 2022

Copy link
Copy Markdown
Contributor

looks good now. let's just do a round of sanity testing

@RSalman

RSalman commented Apr 5, 2022

Copy link
Copy Markdown
Author

👍 Running a set of Personal Builds

@RSalman
RSalman force-pushed the master branch 3 times, most recently from f8866f3 to ce3150c Compare April 5, 2022 20:58
@RSalman

RSalman commented Apr 5, 2022

Copy link
Copy Markdown
Author

Latest pushes are just squashing commits + rebase

@RSalman RSalman changed the title [WIP] SATB TLH Batch Mark SATB TLH Batch Mark Apr 6, 2022
@RSalman

RSalman commented Apr 6, 2022 •

Copy link
Copy Markdown
Author

Things look good, no issues while testing

Comment thread gc/base/TLHAllocationSupport.cpp Resolved
Comment thread gc/base/TLHAllocationSupport.cpp Resolved
@RSalman
RSalman force-pushed the master branch 3 times, most recently from e61257e to 7feeb8a Compare April 6, 2022 14:37

@amicic amicic left a comment

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.

Looks good, but let's wait for @dmitripivkine's another look before requesting a merge.

Comment thread gc/base/standard/ConcurrentGCSATB.cpp Resolved
Comment thread gc/base/standard/ConcurrentGCSATB.cpp Resolved
@RSalman

RSalman commented Apr 7, 2022

Copy link
Copy Markdown
Author

@0xdaryl ready to be merged, could you please have a look

@0xdaryl 0xdaryl self-assigned this Apr 18, 2022
@0xdaryl

0xdaryl commented Apr 18, 2022

Copy link
Copy Markdown
Contributor

Minor readability issues in the commit message:

Objects allocated while CM (SATB) is active must be marked to preserve invariant required to guarantee correctness.

... preserve the invariant ... (there's a word missing in that sentence, not sure if "the" is the right one)

However, doing so in non-trivial, we must know ...

However, doing so is non-trivial: we must know...

arbitrary bits at the end of the TLH can't be marked, this is problematic for sweep.

... can't be marked, and this is ...

However, the must guarantee that we have at least min obj size available
in the TLH.

However, we must guarantee... (there's a word missing in that sentence, not sure if "we" is the right one)

These changes introduce mechanism to reserve bytes in a TLH by the

... introduce a mechanism ...

If so, part of TOP of TLH is hidden, once TLH ...

If so, part of TOP of TLH is hidden. Once the TLH ...

@RSalman

RSalman commented Apr 18, 2022

Copy link
Copy Markdown
Author

👍 fixed

@0xdaryl

0xdaryl commented Apr 18, 2022

Copy link
Copy Markdown
Contributor

Sorry for being pedantic, but you didn't do the 2nd or the last suggested wording. Was that intentional?

Objects allocated while CM (SATB) is active must be marked to preserve
the invariant required to guarantee correctness.

Instead of marking each obj individually, we can mark on the TLH level.
However, doing so is non-trivial: we must know the start of the last
object to mark the proper range of the TLH. That is, arbitrary bits at
the end of the TLH can't be marked, and this is problematic for sweep.

To get around this issue we seal the TLH with a bogus/dummy obj at the
end of the TLH. With this, we know the precise addr to mark up to.
However, we must guarantee that we have at least min obj size available
in the TLH.

These changes introduce a mechanism for the collector to reserve bytes
in a TLH. Whenever the TLH is refreshed, it queries the collector to
determine if it should reserve space for it. If so, part of TOP of the
TLH is hidden. Once the TLH is about to be flushed/cleared, we restore
the the TLH Top and notify the collector.

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

RSalman commented Apr 19, 2022

Copy link
Copy Markdown
Author

No worries, it should be fixed now. I didn't catch all the suggested changes in those 2, I should of slowed down 😬

@0xdaryl

0xdaryl commented Apr 19, 2022

Copy link
Copy Markdown
Contributor

Jenkins build all

@0xdaryl
0xdaryl merged commit c28fe79 into eclipse-omr:master Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants