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

Revert "Add an internal mode to Lock to have it use non-alertable w… #98867

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

agocke
Copy link
Member

@agocke agocke commented Feb 23, 2024

…aits (#97227)"

This reverts commit e568f75.

This change caused a significant perf regression in ASP.NET GRPC and WebAPI scenarios as detailed in #98021

@kouvel Feel free to bring this change back after the cause of the regression has been fixed.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 23, 2024
@ghost ghost assigned agocke Feb 23, 2024
@ghost
Copy link

ghost commented Feb 23, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

…aits (#97227)"

This reverts commit e568f75.

This change caused a significant perf regression in ASP.NET GRPC and WebAPI scenarios as detailed in #98021

@kouvel Feel free to bring this change back after the cause of the regression has been fixed.

Author: agocke
Assignees: agocke
Labels:

area-NativeAOT-coreclr, needs-area-label

Milestone: -

@jkotas jkotas merged commit f129701 into dotnet:main Feb 23, 2024
176 of 179 checks passed
kouvel added a commit to kouvel/runtime that referenced this pull request Feb 23, 2024
@agocke agocke deleted the revert-perf-regression branch February 23, 2024 22:38
kouvel added a commit to kouvel/runtime that referenced this pull request Mar 1, 2024
kouvel added a commit to kouvel/runtime that referenced this pull request Mar 1, 2024
kouvel added a commit that referenced this pull request Mar 7, 2024
)

* Reapply "Add an internal mode to `Lock` to have it use non-alertable waits (#97227)" (#98867)

This reverts commit f129701.

* Fix Lock's waiter duration computation

PR #97227 introduced a tick count masking issue where the stored waiter start time excludes the upper bit from the ushort tick count, but comparisons with it were not doing the appropriate masking. This was leading to a lock convoy on some heavily contended locks once in a while due to waiters incorrectly appearing to have waited for a long time.

Fixes #98021

* Fix wraparound issue

* Fix recording waiter start time

* Use a bit in the _state field instead
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants