End of concurrent iteration over an OopStorage unconditionally notifies the ServiceThread to do a cleanup. This is a waste of time if there's no cleanup needed, possibly needlessly spinning up the service thread. It would be better to have the case where delete_empty_blocks aborts the cleanup because of a concurrent iteration to also mark the storage as having cleanups deferred, and iteration end notify when there were deferred cleanups. That notification also ought to be taking into account the updated iteration count; if there are multiple concurrent iterations, only the last to complete should notify the service thread.
- is blocked by
-
JDK-8226366 Excessive ServiceThread wakeups for OopStorage cleanup
- Resolved