RFR: 8315559: Delay TempSymbol cleanup to avoid symbol table churn [v4]
Coleen Phillimore
coleenp at openjdk.org
Tue Oct 31 18:55:35 UTC 2023
On Tue, 31 Oct 2023 18:11:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Oli Gillespie has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Adress comments
>>
>> Fix indentation
>> Improve tests
>> Improve comment
>> Remove redundant null check
>> Improve naming
>> Pop when >, not >= max len
>
> src/hotspot/share/oops/symbolHandle.hpp line 122:
>
>> 120: // If the queue is now full, implement a one-in, one-out policy.
>> 121: if (Atomic::add(&_cleanup_delay_len, 1, memory_order_relaxed) > _cleanup_delay_max_entries) {
>> 122: TempSymbolDelayQueueNode* result = _cleanup_delay.pop();
>
> NonblockingQueue's push and pop operations are subject to ABA problems, and
> require the client to address that in some fashion. There's nothing here to do
> that. I think one possibility would be to wrap the push/pop calls in a
> GlobalCounter::CriticalSection and do a GlobalCounter::write_synchronize
> before deleting a node.
If you have to add more code to wrap NonblockingQueue, please implement it in a .cpp file. I thought NBQ was sufficient for this. Maybe we want some other data structure for this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16398#discussion_r1378042617
More information about the hotspot-dev
mailing list