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

Update spin-wait pause/yield normalization #55295

Merged
merged 5 commits into from
Jul 13, 2021
Merged

Update spin-wait pause/yield normalization #55295

merged 5 commits into from
Jul 13, 2021

Conversation

kouvel
Copy link
Member

@kouvel kouvel commented Jul 7, 2021

  • Modified the measurement to use much less time and to remeasure periodically to reduce CPU usage during startup
  • Each measurement does a low-microsecond-level measurement of pause/yield times
  • Some small amount of history of recent measurements is retained and used to for now take the lowest measurement for normalization
  • Measurements are done lazily, and at most every few seconds another measurement is taken
  • Added a profiling event that includes info about a measurement and the established value from recent measurements that is used for normalization

- Modified the measurement to use much less time and to remeasure periodically to reduce CPU usage during startup
- Each measurement does a low-microsecond-level measurement of pause/yield times
- Some small amount of history of recent measurements is retained and used to for now take the lowest measurement for normalization
- Measurements are done lazily, and at most every few seconds another measurement is taken
- Added a profiling event that includes info about a measurement and the established value from recent measurements that is used for normalization
@kouvel kouvel added this to the 6.0.0 milestone Jul 7, 2021
@kouvel kouvel requested review from brianrob and mangod9 July 7, 2021 21:13
@kouvel kouvel self-assigned this Jul 7, 2021
@ghost
Copy link

ghost commented Jul 7, 2021

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Modified the measurement to use much less time and to remeasure periodically to reduce CPU usage during startup
  • Each measurement does a low-microsecond-level measurement of pause/yield times
  • Some small amount of history of recent measurements is retained and used to for now take the lowest measurement for normalization
  • Measurements are done lazily, and at most every few seconds another measurement is taken
  • Added a profiling event that includes info about a measurement and the established value from recent measurements that is used for normalization
Author: kouvel
Assignees: kouvel
Labels:

area-System.Threading

Milestone: 6.0.0

Copy link
Member

@brianrob brianrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kouvel kouvel merged commit 4ff3762 into dotnet:main Jul 13, 2021
@kouvel kouvel deleted the YpnFix branch July 13, 2021 15:59
@ghost ghost locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants