Skip to content

Conversation

@petermz
Copy link
Contributor

@petermz petermz commented Jan 31, 2023

This is a port of a Hotspot fix. The idea is, currently card table is scanned byte by byte. But the majority of cards are clean, so we could move by 8-byte steps as long as none of those 8 cards are marked, and fall back to single-byte steps otherwise.

Testing shows this speeds up things a bit, especially when heap is large. The charts below show length of the blackenDirtyCardRoots stage for HyperAlloc running with OnlyIncrementally collection policy and different heap sizes.

HyperAlloc-Xmx1g
HyperAlloc-Xmx32g

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 31, 2023
@petermz petermz force-pushed the gc-card-table-word-scan branch from b276577 to cd88d38 Compare February 1, 2023 07:51
@oubidar-Abderrahim
Copy link
Member

Hi, Thank you for contributing to GraalVM, Is there a specific member of the GraalVM team you prefer to review your PR?

@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Feb 7, 2023
@petermz
Copy link
Contributor Author

petermz commented Feb 7, 2023

Hi Abderrahim --
No, I don't think I have any preference

@oubidar-Abderrahim
Copy link
Member

Hi @wirthi, could you please assign someone from the team to review this PR? Once the PR gets approved I can integrate it internally, Thank you.

Copy link
Member

@christianhaeubl christianhaeubl left a comment

Choose a reason for hiding this comment

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

Thanks for working on the performance of the card table scanning. The change looks good, I will integrate this change after I did some additional testing and benchmarking.

@christianhaeubl
Copy link
Member

I did some benchmarking and your PR had a negative impact on a small number of benchmarks. I opened a PR that potentially replaces your PR: #5963. The implementation there, is closer to the one in HotSpot and doesn't seem to have any negative performance impacts.

If possible, please re-run your benchmarks with the PR from above and verify that the speedups are similar to the ones that you saw with your implementation.

@petermz
Copy link
Contributor Author

petermz commented Feb 14, 2023

I've measured speedups with your PR, they are about the same. Thanks!

@christianhaeubl
Copy link
Member

Thanks for checking, then I am closing this PR in favor of #5963.

@petermz petermz deleted the gc-card-table-word-scan branch February 16, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants