Skip to content

Commit 792d829

Browse files
committed
8319205: Parallel: Reenable work stealing after JDK-8310031
Reviewed-by: tschatzl, iwalulya
1 parent 23a96bf commit 792d829

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,9 @@ void PSPromotionManager::drain_stacks_depth(bool totally_drain) {
234234
// Drain overflow stack first, so other threads can steal from
235235
// claimed stack while we work.
236236
while (tq->pop_overflow(task)) {
237-
// In PSCardTable::scavenge_contents_parallel(), when work is distributed
238-
// among different workers, an object is never split between multiple workers.
239-
// Therefore, if a worker gets owned a large objArray, it may accumulate
240-
// many tasks (corresponding to every element in this array) in its
241-
// task queue. When there are too many overflow tasks, publishing them
242-
// (via try_push_to_taskqueue()) can incur noticeable overhead in Young GC
243-
// pause, so it is better to process them locally until large-objArray-splitting is implemented.
244-
process_popped_location_depth(task);
237+
if (!tq->try_push_to_taskqueue(task)) {
238+
process_popped_location_depth(task);
239+
}
245240
}
246241

247242
while (tq->pop_local(task, threshold)) {

0 commit comments

Comments
 (0)