Skip to content

Commit

Permalink
8315781: Reduce the max value of GCDrainStackTargetSize
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, iwalulya
  • Loading branch information
albertnetymk committed Sep 11, 2023
1 parent 35bccac commit 996b336
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/hotspot/share/gc/g1/g1Arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ void G1Arguments::initialize() {
FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
}

// By default do not let the target stack size to be more than 1/4 of the entries
if (FLAG_IS_DEFAULT(GCDrainStackTargetSize)) {
FLAG_SET_ERGO(GCDrainStackTargetSize, MIN2(GCDrainStackTargetSize, TASKQUEUE_SIZE / 4));
}

#ifdef COMPILER2
// Enable loop strip mining to offer better pause time guarantees
if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ void G1CMTask::drain_local_queue(bool partially) {
// of things to do) or totally (at the very end).
uint target_size;
if (partially) {
target_size = MIN2(_task_queue->max_elems() / 3, GCDrainStackTargetSize);
target_size = GCDrainStackTargetSize;
} else {
target_size = 0;
}
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/parallel/psPromotionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ PSPromotionManager::PSPromotionManager() {
if (ParallelGCThreads == 1) {
_target_stack_size = 0;
} else {
// don't let the target stack size to be more than 1/4 of the entries
_target_stack_size = MIN2(GCDrainStackTargetSize, (queue_size / 4));
_target_stack_size = GCDrainStackTargetSize;
}

_array_chunk_size = ParGCArrayScanChunk;
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/gc_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
product(uint, GCDrainStackTargetSize, 64, \
"Number of entries we will try to leave on the stack " \
"during parallel gc") \
range(0, (UINT_MAX - 1) / 2) \
range(0, 8 * 1024) \
\
product(uint, GCCardSizeInBytes, 512, \
"Card table entry size (in bytes) for card based collectors") \
Expand Down

1 comment on commit 996b336

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.