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

8286823: Default to UseAVX=2 on all Skylake/Cascade Lake CPUs #8731

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/hotspot/cpu/x86/vm_version_x86.cpp
Expand Up @@ -895,8 +895,9 @@ void VM_Version::get_processor_features() {
}
}
if (FLAG_IS_DEFAULT(UseAVX)) {
// Don't use AVX-512 on older Skylakes unless explicitly requested.
if (use_avx_limit > 2 && is_intel_skylake() && _stepping < 5) {
// Don't use AVX-512 on Skylake (or the related Cascade Lake) CPUs unless explicitly
// requested - these instructions can cause performance issues on these processors.
if (use_avx_limit > 2 && is_intel_skylake()) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe is_intel_skylake needs to be changed to is_cpu_model_intel_skylake? It will make clear that all CPUs based on Skylake model are excluded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree it's not necessarily a perfect name, but I haven't changed its behaviour so I figured I can avoid making my change any bigger than necessary. The intention of this particular usage is clarified in my comment. It's used in another place too, where it's evidently understood to include Cascade lake since the comment mentions Ice lake + (Cascade lake successor).

FLAG_SET_DEFAULT(UseAVX, 2);
} else {
FLAG_SET_DEFAULT(UseAVX, use_avx_limit);
Expand Down