RFR: 8069273: Decrease Hot Card Cache Lock contention

Claes Redestad claes.redestad at oracle.com
Thu Jan 22 16:27:50 UTC 2015


Hi all,

please review this patch which replaces the use of mutex-based locking in
G1HotCardCache with a non-blockingCAS loop.

webrev: http://cr.openjdk.java.net/~redestad/8069273/webrev.01/
bug: https://bugs.openjdk.java.net/browse/JDK-8069273

This improves performance in a microbenchmark designed to indirectly
stress the "card is hot"branch of G1HotCardCache::insert[1]. More thorough
performance testing is in progress.

An initial prototype did not isolate the _hot_cache_idx, which introduced
catastrophic levelsof falsesharing on nearby fields, ending up in
odd results and no real effect on totalthroughput. The padding introduced
around_hot_cache_idxand _hot_cache_par_claimed_idx was necessary to
address this.

Testing: JPRT-testset hotspot

/Claes

[1] http://cr.openjdk.java.net/~redestad/8069273/G1HotCardBench.java


More information about the hotspot-gc-dev mailing list