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

Ignore threads_per_core for unsupported machine types in vm-instance #382

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

kkr16
Copy link
Contributor

@kkr16 kkr16 commented Jun 30, 2022

Description

Adds a condition to the advanced_machine_features block in the vm-instance module that is used to bypass the threads_per_core parameter for machine types that do not support setting an SMT parameter (t2d instances, shared core instances, and instances with <2 vCPU).

The default threads_per_core has been set to 0, which translates to an intelligent default behavior that turns off SMT on supported machine types, and removes the parameter where it is not supported.

To test, test_configs/threads_per_core.yaml has been expanded to include more machine types, and threads_per_core=null, and threads_per_core=0.

Submission Checklist

  • Have you installed and run this change against pre-commit? (pre-commit install)
  • Are all tests passing? (make tests)
  • Have you written unit tests to cover this change?
  • Is unit test coverage still above 80%?
  • Have you updated all applicable documentation?
  • Have you followed the guidelines in our Contributing document?

@tpdownes
Copy link
Member

/gcbrun

@nick-stroud nick-stroud assigned kkr16 and unassigned nick-stroud Jun 30, 2022
@nick-stroud nick-stroud assigned nick-stroud and kkr16 and unassigned kkr16 and nick-stroud Jul 11, 2022
@tpdownes
Copy link
Member

@kkr16 does this merit review now?

Please edit the PR to target the develop branch. You may need to rebase. All PRs initially land on develop before release.

@kkr16
Copy link
Contributor Author

kkr16 commented Jul 12, 2022

@kkr16 does this merit review now?

No, @nick-stroud and I had a chat on the target behavior. I'll push a change accordingly.

Please edit the PR to target the develop branch. You may need to rebase. All PRs initially land on develop before release.

Will do. Thanks!

@kkr16 kkr16 changed the base branch from main to develop July 13, 2022 02:22
@tpdownes
Copy link
Member

Please squash these commits as advised in #411

@kkr16
Copy link
Contributor Author

kkr16 commented Jul 13, 2022

Please squash these commits as advised in #411

Done. Thanks!

@kkr16 kkr16 assigned nick-stroud and unassigned kkr16 Jul 13, 2022
@tpdownes
Copy link
Member

/gcbrun

modules/compute/vm-instance/main.tf Outdated Show resolved Hide resolved
modules/compute/vm-instance/main.tf Outdated Show resolved Hide resolved
modules/compute/vm-instance/main.tf Outdated Show resolved Hide resolved
@nick-stroud
Copy link
Collaborator

nick-stroud commented Jul 14, 2022

@kkr16, I just had a few "nits". For context, "nits" are suggestions that, in my opinion, would improve the code but are not required for my approval. It is your choice whether or not to accept these suggestions.

If you want to decline the suggestions, then just respond "Ack." to the comment and resolve the thread. This just lets me know that you saw it and are not going to act on it. If you do make any of the suggested changes then I would just add it as one additional commit titled something like "Addressing feedback". Either way once you are done I will approve and merge.

@nick-stroud nick-stroud assigned kkr16 and unassigned nick-stroud Jul 14, 2022
@kkr16 kkr16 assigned nick-stroud and unassigned kkr16 Jul 15, 2022
@nick-stroud
Copy link
Collaborator

/gcbrun

@nick-stroud nick-stroud merged commit 731ccdf into GoogleCloudPlatform:develop Jul 15, 2022
@kkr16 kkr16 deleted the fix-smt branch July 15, 2022 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants