RFR: 8237842: Separate definitions for default cache line and padding sizes [v2]

Daniel D. Daugherty dcubed at openjdk.org
Wed Dec 20 22:04:48 UTC 2023


On Wed, 6 Dec 2023 22:34:24 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> @dcubed-ojdk, as author of [JDK-8049737](https://bugs.openjdk.org/browse/JDK-8049737) changes, do you remember why we use double cacheline for padding?

Sorry, I've been pretty much off the air w.r.t e-mail due to problems with my MBP13.

We used double cache line size way back then because some hardware fetched two cache
lines worth. I believe that was true of some Intel versions and SPARCV9. I got the two cache
line worth request from Dave Dice.

Way back in the time frame of JDK-8049737 I wrote some micro benchmarks that we tested
with no padding, with one cache line worth of padding and two cache lines worth of padding
and we saw performance improvements on linux-x64, solaris-sparc64, solaris-x64 and I think
smaller improvements on windows-x64. We tried to convert my microbenchmarks into JMHs
without success.

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

PR Comment: https://git.openjdk.org/jdk/pull/16973#issuecomment-1865199986


More information about the hotspot-dev mailing list