Skip to content

Commit 996b336

Browse files
committed
8315781: Reduce the max value of GCDrainStackTargetSize
Reviewed-by: tschatzl, iwalulya
1 parent 35bccac commit 996b336

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ void G1Arguments::initialize() {
230230
FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
231231
}
232232

233-
// By default do not let the target stack size to be more than 1/4 of the entries
234-
if (FLAG_IS_DEFAULT(GCDrainStackTargetSize)) {
235-
FLAG_SET_ERGO(GCDrainStackTargetSize, MIN2(GCDrainStackTargetSize, TASKQUEUE_SIZE / 4));
236-
}
237-
238233
#ifdef COMPILER2
239234
// Enable loop strip mining to offer better pause time guarantees
240235
if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ void G1CMTask::drain_local_queue(bool partially) {
23182318
// of things to do) or totally (at the very end).
23192319
uint target_size;
23202320
if (partially) {
2321-
target_size = MIN2(_task_queue->max_elems() / 3, GCDrainStackTargetSize);
2321+
target_size = GCDrainStackTargetSize;
23222322
} else {
23232323
target_size = 0;
23242324
}

src/hotspot/share/gc/parallel/psPromotionManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ PSPromotionManager::PSPromotionManager() {
183183
if (ParallelGCThreads == 1) {
184184
_target_stack_size = 0;
185185
} else {
186-
// don't let the target stack size to be more than 1/4 of the entries
187-
_target_stack_size = MIN2(GCDrainStackTargetSize, (queue_size / 4));
186+
_target_stack_size = GCDrainStackTargetSize;
188187
}
189188

190189
_array_chunk_size = ParGCArrayScanChunk;

src/hotspot/share/gc/shared/gc_globals.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@
687687
product(uint, GCDrainStackTargetSize, 64, \
688688
"Number of entries we will try to leave on the stack " \
689689
"during parallel gc") \
690-
range(0, (UINT_MAX - 1) / 2) \
690+
range(0, 8 * 1024) \
691691
\
692692
product(uint, GCCardSizeInBytes, 512, \
693693
"Card table entry size (in bytes) for card based collectors") \

0 commit comments

Comments
 (0)