Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2 #5439

Closed
wants to merge 8 commits into from

Conversation

kabutz
Copy link
Contributor

@kabutz kabutz commented Sep 9, 2021

…of MAX_PRIORITY-2 during refactoring

Appears in Java 17 for the first time.

During refactoring, the priority was changed from Thread.MAX_PRIORITY - 2 to instead state Thread.MIN_PRIORITY - 2, which results in a negative priority, and is thus set to Thread.NORM_PRIORITY. Thus the Cleaner by default now has threads with priority 5, instead of 8.

The change was done in git revision # 992b500 and label 8261036 by Claes Redestad


Progress

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

Issue

  • JDK-8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5439/head:pull/5439
$ git checkout pull/5439

Update a local copy of the PR:
$ git checkout pull/5439
$ git pull https://git.openjdk.java.net/jdk pull/5439/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5439

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5439.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 9, 2021

👋 Welcome back kabutz! 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
Copy link

@openjdk openjdk bot commented Sep 9, 2021

@kabutz The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs label Sep 9, 2021
@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Sep 9, 2021

I've created JDK-8273541 to track this.

Copy link
Contributor

@shipilev shipilev left a comment

This looks good. @cl4es might want to confirm that change was not intentional.

@shipilev
Copy link
Contributor

@shipilev shipilev commented Sep 9, 2021

Please change the PR title to "8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2" to get it automatically hooked by bots.

@kabutz kabutz changed the title Thread priority of Cleaner threads was set to MIN_PRIORITY-2 instead … 8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2 Sep 9, 2021
@kabutz
Copy link
Contributor Author

@kabutz kabutz commented Sep 10, 2021

Why would jcheck say "This PR contains no changes" @shipilev ?

@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Sep 10, 2021

It looks like d621cdd has undone the changes.

@kabutz
Copy link
Contributor Author

@kabutz kabutz commented Sep 10, 2021

It looks like d621cdd has undone the changes.

Thanks Alan!

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

⚠️ @kabutz This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk bot added the rfr label Sep 10, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 10, 2021

Webrevs

Copy link
Contributor

@shipilev shipilev left a comment

This looks fine to me.

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

@kabutz 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:

8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2

Reviewed-by: shade, alanb, lancea

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 3 new commits pushed to the master branch:

  • c1e39fa: 8273482: Remove "foreground work" concept from WorkGang
  • 2eaf374: 8272698: LoadNode::pin is unused
  • 792281d: 8264517: C2: make MachCallNode::return_value_is_used() only available for x86

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev, @AlanBateman, @LanceAndersen) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Sep 10, 2021
Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

This should be ready to integrate so please enter /integrate in a new comment and then it can be sponsored.

Thank you

@kabutz
Copy link
Contributor Author

@kabutz kabutz commented Sep 10, 2021

/integrate

@openjdk openjdk bot added the sponsor label Sep 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

@kabutz
Your change (at version 8c69beb) is now ready to be sponsored by a Committer.

@cl4es
Copy link
Member

@cl4es cl4es commented Sep 10, 2021

This looks good. @cl4es might want to confirm that change was not intentional.

Completely unintentional, and perplexing since it's not a simple copy-paste error..

@cl4es
Copy link
Member

@cl4es cl4es commented Sep 10, 2021

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

Going to push as commit 4e6de5f.
Since your change was applied there have been 3 commits pushed to the master branch:

  • c1e39fa: 8273482: Remove "foreground work" concept from WorkGang
  • 2eaf374: 8272698: LoadNode::pin is unused
  • 792281d: 8264517: C2: make MachCallNode::return_value_is_used() only available for x86

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 10, 2021
@openjdk openjdk bot added integrated and removed ready rfr sponsor labels Sep 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

@cl4es @kabutz Pushed as commit 4e6de5f.

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

@kabutz
Copy link
Contributor Author

@kabutz kabutz commented Sep 10, 2021

This looks good. @cl4es might want to confirm that change was not intentional.

Completely unintentional, and perplexing since it's not a simple copy-paste error..

The thread priorities in Java are the wrong way round, (high is 10, low is 1) so I was not surprised by this mistake.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 12, 2021

Mailing list message from David Holmes on core-libs-dev:

On 11/09/2021 5:24 am, kabutz wrote:

On Fri, 10 Sep 2021 14:08:05 GMT, Claes Redestad <redestad at openjdk.org> wrote:

This looks good. @cl4es might want to confirm that change was not intentional.

Completely unintentional, and perplexing since it's not a simple copy-paste error..

The thread priorities in Java are the wrong way round, (high is 10, low is 1) so I was not surprised by this mistake.

They are not "the wrong way around" they followed Solaris Global
Dispatch Priorities (and Windows priorities for that matter). It makes a
lot more sense than systems where a "higher priority" means a lower
numerical priority value IMO.

:)

Cheers,
David

@kabutz kabutz deleted the thread_priority branch Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs integrated
5 participants