RFR: 8276618: Pad cacheline for Thread::_rcu_counter

David Holmes dholmes at openjdk.java.net
Thu Nov 4 06:19:09 UTC 2021


On Thu, 4 Nov 2021 05:09:48 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Currently, Thread::_rcu_counter is not padded by cacheline, it should be beneficail to do so.
> 
> The initial spebjbb test shows about 10.5% improvement of critical, and 0.7% improvement of max in specjbb2015, specjbb arguments:
>   GROUP_COUNT=4
>   TI_JVM_COUNT=1
>   JAVA_OPTS_BE="-server -XX:+UseG1GC -Xms32g -Xmx32g"
>   MODE_ARGS="-ikv"

Hi Hamlin,

This seems reasonable to me, however whenever we add padding to optimise the placement of one field, I always wonder if that same padding has de-optimised the placement of other fields? I think we need to see a broader run of benchmarks here and across more than just x86_64.

I will see if I can assist on the benchmark front.

Thanks,
David

src/hotspot/share/runtime/thread.hpp line 253:

> 251: 
> 252:   // Support for GlobalCounter
> 253:  private:

pre-existing nit: this private is not needed; nor is the public at line 260.

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

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



More information about the hotspot-gc-dev mailing list