This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stephentoub
reviewed
Oct 30, 2017
src/vm/yieldprocessornormalized.cpp
Outdated
|
||
// Defaults are for when InitializeYieldProcessorNormalized has not yet been called or when no measurement is done, and are | ||
// tuned for Skylake processors | ||
unsigned int g_yieldsPerNormalizedYield = 1; // current value is for Skylake processors, this would be 9 for pre-Skylake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "this would be 9" => this is expected to be ~9"
stephentoub
reviewed
Oct 30, 2017
src/vm/yieldprocessornormalized.cpp
Outdated
const int NsPerSecond = 1000 * 1000 * 1000; | ||
|
||
// If this constant is changed, the shift value in YieldProcessorWithBackOffNormalized() should be changed as well | ||
const int MaxOptimalMaxNormalizedYieldsPerSpinIteration = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did the value of 10 come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to calculate the value based on other constants instead of hard-coding something close to it and added some comments.
stephentoub
approved these changes
Oct 30, 2017
briansull
pushed a commit
to briansull/coreclr
that referenced
this pull request
Oct 31, 2017
Move YieldProcessorNormalized into separate files Clean up YieldProcessorNormalized
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Separated YieldProcessorNormalized changes from PR #14216 to simplify that PR: