Skip to content

Conversation

@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Mar 13, 2025

Follow up to JDK-8319447 to change the VirtualThread implementation to use FJP's delayed task handling.

The SPTE based implementation is not removed. It will continue to be used by tests. If custom schedulers are exposed in the future then they will use this implementation.

For timed-Object.wait, waitTimeoutExpired is changed to use lazySubmit to avoid signalling and increase the chance that the unparked virtual thread will continue on the current carrier. For timed-park, the timeout task is changed to reduced form of unpark that also uses lazySubmit, for the same reason.

jcmd Thread.vthread_scheduler is changed to no longer print the delay schedulers. Instead, the delayed task count will appear in the default scheduler output.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8351927: Change VirtualThread implementation to use use FJP delayed task handling (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24030/head:pull/24030
$ git checkout pull/24030

Update a local copy of the PR:
$ git checkout pull/24030
$ git pull https://git.openjdk.org/jdk.git pull/24030/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24030

View PR using the GUI difftool:
$ git pr show -t 24030

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24030.diff

Using Webrev

Link to Webrev Comment

@AlanBateman AlanBateman marked this pull request as ready for review April 8, 2025 14:24
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 8, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 8, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 9, 2025
@AlanBateman
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 9, 2025

Going to push as commit 6c93ad4.
Since your change was applied there have been 59 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 9, 2025
@openjdk openjdk bot closed this Apr 9, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 9, 2025
@openjdk
Copy link

openjdk bot commented Apr 9, 2025

@AlanBateman Pushed as commit 6c93ad4.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants