[crac] RFR: Active cleanup by CleanerImpl on checkpoint [v3]

Anton Kozlov akozlov at openjdk.org
Tue Jun 6 16:19:20 UTC 2023

On Tue, 6 Jun 2023 08:15:51 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> Rather than registering PhantomCleanableRef as a resource that gets cleaned up in the C/R thread force cleanup in the CleanerImpl as this already keeps a list of all eligible references.
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>   Don't block the cleaner thread during C/R at all.

LGTM, thank you!

src/java.base/share/classes/jdk/internal/ref/CleanerImpl.java line 160:

> 158:                             wait();
> 159:                         }
> 160:                         cleanupComplete = false;

AFIAU this synchronizes with beforeCheckpoint to verfiy cleanupComplete==true is noticied. An alternative would be to drop this sync, releasing cleaner sooner, and then just reset cleanupComplete in beforeCheckpoint(). But this is not a big deal.


Marked as reviewed by akozlov (Lead).

PR Review: https://git.openjdk.org/crac/pull/73#pullrequestreview-1465587337
PR Review Comment: https://git.openjdk.org/crac/pull/73#discussion_r1219940547

More information about the crac-dev mailing list