On Fri, 21 Nov 2025 01:01:48 GMT, David Holmes <[email protected]> wrote:
>> src/hotspot/share/runtime/mountUnmountDisabler.cpp line 162: >> >>> 160: // be executed once we go back to Java. If this is an unmount, the >>> handshake that the >>> 161: // disabler executed against this carrier thread already provided >>> the needed synchronization. >>> 162: // This matches the release fence in >>> xx_enable_for_one()/xx_enable_for_all(). >> >> Subtle. Do we have comments where the fences are to ensure people realize >> the fence is serving this purpose? > > I also forgot to suggest a wording change: say "pairs with" rather than > "matches". Reading back through I realize now I have misunderstood many of > these comments. Changed to `pairs with`. I rewrote the comments so hopefully they are more clear now. I also added a comment in `VirtualThread.mount/unmount` where the memory barriers should be. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28361#discussion_r2561205763
