RFR: 8329488: Move OopStorage code from safepoint cleanup and remove safepoint cleanup code
Coleen Phillimore
coleenp at openjdk.org
Mon Apr 8 13:58:12 UTC 2024
On Sat, 6 Apr 2024 13:33:11 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> 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.
The ServiceThread loops because it has a fixed wait timeout now. It won't process these every time it's notified which can be more frequent. This comment seems to say that there's more work, so do it next time. I guess resetting the permit time to zero would prevent these cleanups from getting behind. Are there tests for this condition?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18375#discussion_r1555888210
More information about the hotspot-dev
mailing list