Integrated: 8331405: Shenandoah: Optimize ShenandoahLock with TTAS

Aleksey Shipilev shade at openjdk.org
Thu May 2 08:28:57 UTC 2024


On Tue, 30 Apr 2024 10:29:53 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> JDK-8325587 made the contended lock acquisition as the CAS loop with backoffs. Unfortunately, for `SpinPause` path, we always do the CAS and then spin. This is not efficient, as CAS likely requests memory for ownership, which exacerbates the contention and makes the spin loop run longer before blocking.
> 
> We should really use TTAS pattern there, like `Thread::SpinAcquire` does it.
> 
> Additional testing:
>  - [x] Linux AArch64 server fastdebug, `hotspot_gc_shenandoah`
>  - [ ] Linux AArch64 server fastdebug, `all` with `-XX:+UseShenandoahGC`

This pull request has now been integrated.

Changeset: c4fe5bf9
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c4fe5bf90c2d368c29714de63a90eca444fb3ece
Stats:     2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8331405: Shenandoah: Optimize ShenandoahLock with TTAS

Reviewed-by: zgu, ysr

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

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


More information about the shenandoah-dev mailing list