RFR: 8324849: Uniform use of synchronizations in NMT

Thomas Stuefe stuefe at openjdk.org
Mon Feb 26 14:40:53 UTC 2024


On Mon, 26 Feb 2024 07:53:26 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> In NMT, both `ThreadCritical` and `Tracker` objects are used to do synchronizations. `Tracker` class uses `ThreadCritical` internally and used only for uncommit and release memory operations.  In this change, `Tracker` class is replaced with explicit use of `ThreadCritical` to be the same as the other instances of sync'ing NMT operations.
>> 
>> tiers1-5 tests passed.
>
> I never understood why we had this `Tracker` class  so I'm inclined to accept this PR, but I'd like to wait for other opinions before giving you an approval.

BTW, since you are here, and if @jdksjolen agrees:

Could we rename VirtualMemoryTracker::remove_uncommitted_region to something else (e.g. VirtualMemoryTracker::remove_committed_region or VirtualMemoryTracker::uncommit_region)? I always start wondering when reading this function name, since we don't remove an uncommitted region, we uncommit a region resp. remove a committed region.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18000#issuecomment-1964300369


More information about the hotspot-dev mailing list