Skip to content


8319205: Parallel: Reenable work stealing after JDK-8310031
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, iwalulya
  • Loading branch information
albertnetymk committed Nov 2, 2023
1 parent 23a96bf commit 792d829
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/hotspot/share/gc/parallel/psPromotionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,9 @@ void PSPromotionManager::drain_stacks_depth(bool totally_drain) {
// Drain overflow stack first, so other threads can steal from
// claimed stack while we work.
while (tq->pop_overflow(task)) {
// In PSCardTable::scavenge_contents_parallel(), when work is distributed
// among different workers, an object is never split between multiple workers.
// Therefore, if a worker gets owned a large objArray, it may accumulate
// many tasks (corresponding to every element in this array) in its
// task queue. When there are too many overflow tasks, publishing them
// (via try_push_to_taskqueue()) can incur noticeable overhead in Young GC
// pause, so it is better to process them locally until large-objArray-splitting is implemented.
if (!tq->try_push_to_taskqueue(task)) {

while (tq->pop_local(task, threshold)) {
Expand Down

1 comment on commit 792d829

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.