RFR: 8322484: 22-b26 Regression in J2dBench-bimg_misc-G1 (and more) on Windows-x64 and macOS-x64 [v2]

Thomas Schatzl tschatzl at openjdk.org
Fri Jan 26 09:29:51 UTC 2024


> Hi all,
> 
>   please review this improvement to managing region pin counts in g1.
> 
> Some applications do millions of `Get/ReleasePrimitiveArrayCritical` operations per second, in particular some of the j2dbench benchmarks (e.g. vimg_copyarea 10M/s), on some platforms. Every pin/unpin results in an atomic operation that is the cause for these slowdown. 
> 
> Only Windows seems to be significantly affected.
> 
> This suggested change implements a per-region thread local cache storing the current pin/unpin refcount difference, writing it back only when a thread pins/unpin an object in a different region.
> 
> For these benchmarks this often reduces the amount of atomic operations to none, or a few handful; the worst improvement I have seen is that effective atomic operations were reduced to 1/10th. Overall all the j2dbench benchmark scores improve.
> 
> There is a remaining issue with the `vimg_shapes_gradient` J2dbench subbenchmark: comparing the original results (before integration of region pinning) with latest jdk23 results, there is a regression of about 5%; this is caused by the backout of a bad compiler change (https://bugs.openjdk.org/browse/JDK-8322985). This will be fixed by its redo CR https://bugs.openjdk.org/browse/JDK-8323116.
> 
> Testing: tier1-3, j2dbench, dacapo, specj*, renaissance benchmarks
> 
> Thanks,
>   Thomas

Thomas Schatzl has updated the pull request incrementally with two additional commits since the last revision:

 - ayang review
 - kbarrett, ayang review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17552/files
  - new: https://git.openjdk.org/jdk/pull/17552/files/7161a0f7..4991abb2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17552&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17552&range=00-01

  Stats: 62 lines in 7 files changed: 13 ins; 44 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/17552.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17552/head:pull/17552

PR: https://git.openjdk.org/jdk/pull/17552


More information about the hotspot-gc-dev mailing list