mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8365317: ZGC: Setting ZYoungGCThreads lower than ZOldGCThreads may result in a crash
Reviewed-by: tschatzl, eosterlund
This commit is contained in:
parent
a6be228642
commit
3e3298509f
@ -725,8 +725,8 @@ static ZWorkerCounts select_worker_threads(const ZDirectorStats& stats, uint you
|
||||
// Adjust down the old workers so the next minor during major will be less sad
|
||||
old_workers = old_workers_clamped;
|
||||
// Since collecting the old generation depends on the initial young collection
|
||||
// finishing, we don't want it to have fewer workers than the old generation.
|
||||
young_workers = MAX2(old_workers, young_workers);
|
||||
// finishing, we ideally don't want it to have fewer workers than the old generation.
|
||||
young_workers = clamp(MAX2(old_workers, young_workers), 1u, ZYoungGCThreads);
|
||||
} else if (type == ZWorkerSelectionType::minor_during_old) {
|
||||
// Adjust young and old workers for minor during old to fit within ConcGCThreads
|
||||
young_workers = young_workers_clamped;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user