--- old/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp 2017-11-20 16:08:09.989066509 +0100 +++ new/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp 2017-11-20 16:08:09.576053970 +0100 @@ -104,7 +104,7 @@ _threads[worker_id] = create_refinement_thread(worker_id, false); thread_to_activate = _threads[worker_id]; } - if (thread_to_activate != NULL) { + if (thread_to_activate != NULL && !thread_to_activate->is_active()) { thread_to_activate->activate(); } } @@ -418,7 +418,7 @@ } void G1ConcurrentRefine::maybe_activate_more_threads(uint worker_id, size_t num_cur_buffers) { - if (activation_threshold(worker_id + 1) > num_cur_buffers) { + if (num_cur_buffers > activation_threshold(worker_id + 1)) { _thread_control.maybe_activate_next(worker_id); } }