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

RyuJIT: Implement mitigation for Intel JCC erratum #93243

Open
BruceForstall opened this issue Oct 9, 2023 · 4 comments
Open

RyuJIT: Implement mitigation for Intel JCC erratum #93243

BruceForstall opened this issue Oct 9, 2023 · 4 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Priority:2 Work that is important, but not critical for the release
Milestone

Comments

@BruceForstall
Copy link
Member

Issue #35730 describes an Intel architecture erratum related to JCC instructions and the performance impact of the microcode mitigation that was implemented.

The performance impact causes seemingly random and significant regressions, due to code and instruction alignment, especially in micro-benchmarks, that can make analyzing the performance impact of JIT and other changes difficult and frustrating.

This issue is to implement a mode in the JIT to avoid the JCC erratum by altering generated code to avoid triggering the erratum condition. This will likely involve strategic insertion of NOP instructions. This mode will primarily be useful to aid developers analyzing the performance impact of JIT (and other) changes. Based on code size regressions and other performance characteristics of the mode, we can consider it for permanent enabling on affected platforms.

@BruceForstall BruceForstall added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 9, 2023
@BruceForstall BruceForstall added this to the 9.0.0 milestone Oct 9, 2023
@ghost
Copy link

ghost commented Oct 9, 2023

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

Issue Details

Issue #35730 describes an Intel architecture erratum related to JCC instructions and the performance impact of the microcode mitigation that was implemented.

The performance impact causes seemingly random and significant regressions, due to code and instruction alignment, especially in micro-benchmarks, that can make analyzing the performance impact of JIT and other changes difficult and frustrating.

This issue is to implement a mode in the JIT to avoid the JCC erratum by altering generated code to avoid triggering the erratum condition. This will likely involve strategic insertion of NOP instructions. This mode will primarily be useful to aid developers analyzing the performance impact of JIT (and other) changes. Based on code size regressions and other performance characteristics of the mode, we can consider it for permanent enabling on affected platforms.

Author: BruceForstall
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: 9.0.0

@TIHan
Copy link
Contributor

TIHan commented Jan 26, 2024

@JulieLeeMSFT This is something we want to do for .NET 9, but I will look into sometime after we finish the SVE work. I spoke with @kunalspathak about it.

@TIHan TIHan added the Priority:2 Work that is important, but not critical for the release label May 6, 2024
@JulieLeeMSFT
Copy link
Member

@TIHan TIHan modified the milestones: 9.0.0, Future Jul 25, 2024
@TIHan
Copy link
Contributor

TIHan commented Jul 25, 2024

Moving to future as we will not have time to complete this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

3 participants