RFR: 8287788: Implement a better allocator for downcalls [v8]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Jan 23 14:57:50 UTC 2025
On Thu, 23 Jan 2025 14:35:29 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> If this is really the case, I agree that there doesn't seem to be an alternative to use `ofAuto`. In which case you don't really need a TerminatingThreadLocal -- a CarrierThreadLocal is just fine (given we don't really have anything to do on close).
>
> alternatively - we could have some kind of internal "forceClose" API which doesn't check the owner thread. Some care is probably needed as the access is now on a different thread, so we'll need to make sure that some volatile accesses are used by this method, otherwise it might "miss" cleanup actions.
A simpler (maybe interim) solution: if the requesting thread is not virtual, use the cache (and use a confined arena). Otherwise use a brand new confined arena.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23142#discussion_r1927115941
More information about the core-libs-dev
mailing list