JDK-8151564 : JDK-8150134 broke concurrent refinement thread deactivation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2016-03-09
  • Updated: 2016-03-09
  • Resolved: 2016-03-09
Related Reports
Relates :  
Relates :  
Description
JDK-8150134 changed the call to DCQS::apply_closure_to_completed_buffer, passing the thread's deactivation threshold as the stop_at argument. The intent was that this would result in the apply_xxx doing nothing and returning false if there aren't at least that many buffers available, and the false return value is used to trigger deactivation.

Unfortunately, that was based on a mis-understanding of the current meaning of the stop_at parameter.  The problem is in DCQS::get_completed_buffer, which contains

  if (_n_completed_buffers <= stop_at) {
    _process_completed = false;
    return NULL;
  }

With the old green_zone value for stop_at, any concurrent refinement thread would only stop here when the the number of completed buffers fell to green_zone, at which point _process_completed would be set false, which is used by the primary refinement thread to determine whether it should be active.

Comments
Incorrect analysis; analysis is wrong, and there isn't a bug here.
09-03-2016

I think the desired effect can be obtained by changing that snippet to reverse the comparison, and to remove the assignment of _process_completed. However, I'm not yet certain I completely understand the ramifications of removing that assignment though. An initial pass through the code makes me think it's OK, but I thought the JDK-8150134 change was OK too.
09-03-2016