8278824: Uneven work distribution when scanning heap roots in G1
Reviewed-by: ayang, tschatzl, phh
This commit is contained in:
parent
54b800d56d
commit
b4b0328d62
@ -106,7 +106,7 @@ 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
|
||||
@ -114,7 +114,7 @@ class G1RemSetScanState : public CHeapObj<mtGC> {
|
||||
// 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user