Skip to content

Update spin-wait pause/yield normalization - #55295

Merged
kouvel merged 5 commits into
dotnet:mainfrom
kouvel:YpnFix
Jul 13, 2021
Merged

Update spin-wait pause/yield normalization#55295
kouvel merged 5 commits into
dotnet:mainfrom
kouvel:YpnFix

Conversation

@kouvel

Copy link
Copy Markdown
Contributor
  • 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
@kouvelkouvel added this to the 6.0.0 milestone Jul 7, 2021
@kouvel
kouvel requested review from brianrob and mangod9July 7, 2021 21:13
@kouvelkouvel self-assigned this Jul 7, 2021
@ghost

ghost commented Jul 7, 2021

Copy link
Copy Markdown

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

Comment threadsrc/coreclr/inc/yieldprocessornormalized.h
Comment threadsrc/coreclr/vm/yieldprocessornormalized.cpp
Comment threadsrc/coreclr/vm/eventtrace.cpp Outdated
Comment threadsrc/coreclr/vm/ClrEtwAll.man
Comment threadsrc/coreclr/vm/yieldprocessornormalized.cpp

@brianrobbrianrob left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@runfoapprunfoappBot mentioned this pull request Jul 10, 2021
@kouvel
kouvel merged commit 4ff3762 into dotnet:mainJul 13, 2021
@kouvel
kouvel deleted the YpnFix branch July 13, 2021 15:59
@ghostghost locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for freeto 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

@kouvel@brianrob@mangod9