Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8278824: Uneven work distribution when scanning heap roots in G1
Reviewed-by: ayang, tschatzl, phh
  • Loading branch information
William Kemper authored and Paul Hohensee committed Dec 28, 2021
1 parent 54b800d commit b4b0328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/g1RemSet.cpp
Expand Up @@ -106,15 +106,15 @@ class G1RemSetScanState : public CHeapObj<mtGC> {
// within a region to claim. Dependent on the region size as proxy for the heap
// size, we limit the total number of chunks to limit memory usage and maintenance
// effort of that table vs. granularity of distributing scanning work.
// Testing showed that 8 for 1M/2M region, 16 for 4M/8M regions, 32 for 16/32M regions,
// Testing showed that 64 for 1M/2M region, 128 for 4M/8M regions, 256 for 16/32M regions,
// and so on seems to be such a good trade-off.
static uint get_chunks_per_region(uint log_region_size) {
// Limit the expected input values to current known possible values of the
// (log) region size. Adjust as necessary after testing if changing the permissible
// values for region size.
assert(log_region_size >= 20 && log_region_size <= 29,
"expected value in [20,29], but got %u", log_region_size);
return 1u << (log_region_size / 2 - 7);
return 1u << (log_region_size / 2 - 4);
}

uint _scan_chunks_per_region; // Number of chunks per region.
Expand Down

3 comments on commit b4b0328

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@earthling-amzn
Copy link

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on b4b0328 Dec 28, 2021

Choose a reason for hiding this comment

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

@earthling-amzn Could not automatically backport b4b0328d to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/hotspot/share/gc/g1/g1RemSet.cpp

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk17u-dev:

$ git checkout -b earthling-amzn-backport-b4b0328d
$ git fetch --no-tags https://git.openjdk.java.net/jdk18 b4b0328d62d9a9646f2822c361e41001bf0d4aa0
$ git cherry-pick --no-commit b4b0328d62d9a9646f2822c361e41001bf0d4aa0
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport b4b0328d62d9a9646f2822c361e41001bf0d4aa0'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport b4b0328d62d9a9646f2822c361e41001bf0d4aa0.

Please sign in to comment.