Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[WIP] Spin Wait tuning #13527

Closed
wants to merge 1 commit into from
Closed

[WIP] Spin Wait tuning #13527

wants to merge 1 commit into from

Conversation

helloguo
Copy link

Work in progress. https://github.com/dotnet/coreclr/issues/13388

This PR tries to tune the Spin Wait on AMD64 and X86 platforms. Because "The latency of PAUSE instruction in prior generation microarchitecture is about 10 cycles, whereas on Skylake microarchitecture it has been extended to as many as 140 cycles."

Assume YieldProcessor() took 10 cycles when the original code was written and tuned. get_cycle_count() is defined as rdtsc.

Use the similar method, which is suggested by the example shown at https://software.intel.com/sites/default/files/managed/9e/bc/64-ia-32-architectures-optimization-manual.pdf

capture-example

@helloguo
Copy link
Author

@kouvel PTAL. This is work in progress. I'd like to hear your feedback before I try something more.

@jkotas
Copy link
Member

jkotas commented Jun 25, 2018

Closing stale PRs. The issue that this is trying to fix is closed. It has been fixed by other changes already.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants