RFR: 8276618: Pad cacheline for Thread::_rcu_counter
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:
> JAVA_OPTS_BE="-server -XX:+UseG1GC -Xms32g -Xmx32g"
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.
src/hotspot/share/runtime/thread.hpp line 253:
> 252: // Support for GlobalCounter
> 253: private:
pre-existing nit: this private is not needed; nor is the public at line 260.
More information about the hotspot-gc-dev