Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk20u Public archive

8307425: Socket input stream read burns CPU cycles with back-to-back poll(0) calls #80

Closed
wants to merge 1 commit into from

Conversation

dfuch
Copy link
Member

@dfuch dfuch commented May 17, 2023

Backport the fix for JDK-8307425 from openjdk/jdk to jdk20u.
This is a clean backport.

It fixes places in NIO where nanoseconds are rounded down to milliseconds, leading to expensive tight poll/read loops in some scenarios - where for instance a 1ms timeout was supplied.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8307425: Socket input stream read burns CPU cycles with back-to-back poll(0) calls

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 80

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk20u/pull/80.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 17, 2023

👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport 73ac710533a45bf5ba17f308aa49556b877b8bf9 8307425: Socket input stream read burns CPU cycles with back-to-back poll(0) calls May 17, 2023
@openjdk
Copy link

openjdk bot commented May 17, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented May 17, 2023

@dfuch This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8307425: Socket input stream read burns CPU cycles with back-to-back poll(0) calls

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 17, 2023
@mlbridge
Copy link

mlbridge bot commented May 17, 2023

Webrevs

@dfuch
Copy link
Member Author

dfuch commented May 19, 2023

/integrate

@openjdk
Copy link

openjdk bot commented May 19, 2023

Going to push as commit 2302454.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 511ba72: 8304350: Font.getStringBounds calculates wrong width for TextAttribute.TRACKING other than 0.0

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 19, 2023

@dfuch Pushed as commit 2302454.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

1 participant