RFR: 8329488: Move OopStorage code from safepoint cleanup and remove safepoint cleanup code

Kim Barrett kbarrett at openjdk.org
Sat Apr 6 13:36:08 UTC 2024


On Sat, 6 Apr 2024 13:14:36 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> This patch gives the ServiceThread a periodic wakeup (same as GuaranteedSafepointInterval) to check if it needs to clean out OopStorage blocks, and move the triggering of this cleaning out of the safepoint cleanup tasks.  Since ICBuffer, StringTable and SymbolTable rehashing have moved, there's nothing that actually triggers the nop safepoint to do cleaning (except SafepointALot), so the OopStorage cleanup won't be triggered.
>> 
>> With moving all of these out of the safepoint cleanup tasks, we can remove the code that sets up multiple threads to do safepoint cleanup.  We can also remove the JFR events and logging that times safepoint cleanup, and a logging test.
>> 
>> Tested with tier1-4.
>
> src/hotspot/share/gc/shared/oopStorage.cpp line 988:
> 
>> 986:   // Exceeded work limit or can't delete last block.  This will
>> 987:   // cause the ServiceThread to loop, giving other subtasks an
>> 988:   // opportunity to run too. There's no need for a notification,
> 
> With the changes to `has_cleanup_work_and_reset` this no longer causes the ServiceThread to loop.
> Instead it requests cleanup at the next scheduled time for the ServiceThread to do so.  And there's no
> longer ever any notification, so the final sentence needs some adjustment.

Hm, with the change to `has_cleanup_work_and_reset` this will result in the service thread deleting
no more than "work limit" blocks per "defer period".  Maybe this should reset the "permit time" too,
so that it _does_ cause the ServiceThread to loop.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18375#discussion_r1554587381


More information about the hotspot-dev mailing list