RFR: 8191786: Thread-SMR hash table size should be dynamic [v2]

Daniel D.Daugherty dcubed at openjdk.java.net
Tue May 25 20:53:34 UTC 2021


On Tue, 25 May 2021 20:39:56 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Small change to switch Thread-SMR's hash table from ResourceHashtable to KVHashtable
>> so that a variable sized hash table is used instead of a fixed size hash table (1031 elements).
>> Also refactor common hash table size calculation code into static hash_table_size()
>> function and call it from both places.
>> 
>> Test with Mach5 Tier[1-7] testing.
>
> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rehn CR

BTW, I suspect @fisk's choice of a max hash_table_size of 64 is due to
his hash function:


        static unsigned int ptr_hash(void * const& s1) {
          // 2654435761 = 2^32 * Phi (golden ratio)
          return (unsigned int)(((uint32_t)(uintptr_t)s1) * 2654435761u);
        }

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

PR: https://git.openjdk.java.net/jdk/pull/4168


More information about the hotspot-runtime-dev mailing list