RFR: 8305670: Performance regression in LockSupport.unpark with lots of idle threads [v10]

Daniel D. Daugherty dcubed at openjdk.org
Sat May 13 14:50:21 UTC 2023


> Address the performance regression in `LockSupport.unpark()` with the following changes:
> - Add `FastThreadsListHandle` helper class to threadSMR.[ch]pp for quickly determining if a JavaThread* is protected by the ThreadsListHandle embedded in the new helper object.
> - Update `Unsafe_Unpark()` to pass `java_lang_Thread::thread_acquire(thread_oop)` to a new instance of the `FastThreadsListHandle` object and only do the unpark work if the target JavaThread* is protected.

Daniel D. Daugherty has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 22 additional commits since the last revision:

 - Merge branch 'JDK-8307068' into JDK-8305670
 - Merge branch 'JDK-8307067' into JDK-8307068
 - Merge branch 'master' into JDK-8307067
 - Merge branch 'JDK-8307068' into JDK-8305670
 - Merge branch 'JDK-8307067' into JDK-8307068
 - Merge branch 'master' into JDK-8307067
 - dholmes CR - FastThreadsListHandle ctr should use java_lang_Thread::thread() instead of java_lang_Thread::thread_acquire(); clarify comments.
 - Merge branch 'JDK-8307068' into JDK-8305670
 - dholmes CR - update comments and switch from java_lang_Thread::set_thread() to release_set_thread().
 - Merge branch 'JDK-8307067' into JDK-8307068
 - ... and 12 more: https://git.openjdk.org/jdk/compare/3e1029cf...a15b4d80

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13519/files
  - new: https://git.openjdk.org/jdk/pull/13519/files/86d1b820..a15b4d80

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13519&range=09
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13519&range=08-09

  Stats: 69279 lines in 798 files changed: 59166 ins; 4592 del; 5521 mod
  Patch: https://git.openjdk.org/jdk/pull/13519.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13519/head:pull/13519

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


More information about the hotspot-runtime-dev mailing list