Skip to content

Commit 066b348

Browse files
author
Kim Barrett
committed
8277807: Increase default initial concurrent refinement threshold
Reviewed-by: tschatzl, sjohanss
1 parent ec0a5ac commit 066b348

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -250,14 +250,21 @@ static size_t calc_min_yellow_zone_size() {
250250
}
251251
}
252252

253+
// An initial guess at the rate for pause-time card refinement for one
254+
// thread, used when computing the default initial green zone value.
255+
const double InitialPauseTimeCardRefinementRate = 200.0;
256+
253257
static size_t calc_init_green_zone() {
254-
size_t green = G1ConcRefinementGreenZone;
255-
const char* name = "G1ConcRefinementGreenZone";
258+
size_t green;
256259
if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
257-
green = ParallelGCThreads;
258-
name = "ParallelGCThreads";
260+
const double rate = InitialPauseTimeCardRefinementRate * ParallelGCThreads;
261+
// The time budget for pause-time card refinement.
262+
const double ms = MaxGCPauseMillis * (G1RSetUpdatingPauseTimePercent / 100.0);
263+
green = rate * ms;
264+
} else {
265+
green = configuration_buffers_to_cards(G1ConcRefinementGreenZone,
266+
"G1ConcRefinementGreenZone");
259267
}
260-
green = configuration_buffers_to_cards(green, name);
261268
return MIN2(green, max_green_zone);
262269
}
263270

0 commit comments

Comments
 (0)