RFR: Load balance remembered set scanning
William Kemper
wkemper at openjdk.org
Wed Jul 27 21:17:36 UTC 2022
On Wed, 27 Jul 2022 19:38:05 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> This branch divides remembered set scanning into smaller units of work so that multiple cores can more effectively share the workload between them. The benefit is to reduce concurrent scan remembered set times and to increase the parallelism of this phase.
Why do we want to group chunks? Why not let the worker threads grab chunks on a first-come-first-serve basis?
src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 274:
> 272: }
> 273:
> 274: ShenandoahRegionChunkIterator::ShenandoahRegionChunkIterator(ShenandoahHeap* heap, size_t worker_count) :
Can we use [constructor delegation](https://en.wikipedia.org/wiki/C++11#Object_construction_improvement) here to remove some duplicated code? Or could we just have clients always pass in the heap reference? One constructor is missing an assert.
src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp line 1025:
> 1023: };
> 1024:
> 1025: typedef struct ChunkOfRegion {
Why `typedef`? Could this just be `struct ShenandoahRegionChunk`?
-------------
Changes requested by wkemper (Committer).
PR: https://git.openjdk.org/shenandoah/pull/153
More information about the shenandoah-dev
mailing list