Skip to content

Conversation

@katiewasnothere
Copy link

@katiewasnothere katiewasnothere commented Oct 27, 2020

This PR adds a new annotation io.microsoft.virtualmachine.cpugroup.id for pod configuration that allows for specifying the ID of a cpugroup the corresponding UVM should be added to. This PR also adds e2e tests and a unit test, which is disabled since cpugroups is only enabled on systems with classic/core scheduling type.

Signed-off-by: Kathryn Baldauf [email protected]

@katiewasnothere katiewasnothere force-pushed the cpugroup_vm_create_on_start branch from 6b8bb2f to 2678abe Compare October 27, 2020 03:16
@katiewasnothere katiewasnothere force-pushed the cpugroup_vm_create_on_start branch from 2678abe to a9cf4d1 Compare October 27, 2020 20:20
@katiewasnothere katiewasnothere force-pushed the cpugroup_vm_create_on_start branch 2 times, most recently from 3294bc7 to 47845df Compare October 28, 2020 00:32
@@ -0,0 +1,121 @@
package uvm
Copy link
Member

Choose a reason for hiding this comment

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

I think we should move out the core CPU groups support into an internal/cpugroup package, and just call into that from uvm.SetCPUGroup and uvm.UnsetCPUGroup.

Copy link
Author

Choose a reason for hiding this comment

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

There are some standalone pieces that I moved out, but the code that needs to be run in Set/Unset/Release require the uvm package, so I did not move those. Let me know if it looks okay.

@katiewasnothere katiewasnothere force-pushed the cpugroup_vm_create_on_start branch from 47845df to 8e78880 Compare October 28, 2020 01:58
@katiewasnothere katiewasnothere force-pushed the cpugroup_vm_create_on_start branch 2 times, most recently from b8689b3 to b08f737 Compare November 19, 2020 01:18
LogicalProcessorCount: uint32(len(logicalProcessors)),
}
if err := modifyCPUGroupRequest(ctx, operation, details); err != nil {
return fmt.Errorf("failed to make cpugroups CreateGroup request with details %v with: %s", details, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can we just make this

return errors.Wrapf(err, "failed to create CPU group with details %v")

the "with details x with y" is odd to read

)

// hostProcessorInfo queries HCS for the UVM hosts processor information, including topology
// HostProcessorInfo queries HCS for the UVM hosts processor information, including topology
Copy link
Contributor

Choose a reason for hiding this comment

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

Can omit the part of the comment that mentions this is for the UVMs host as this is in a more general package now.

Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

LGTM. 2 nitpicky comments

@katiewasnothere katiewasnothere force-pushed the cpugroup_vm_create_on_start branch from b08f737 to bac6480 Compare December 15, 2020 21:25
Copy link
Contributor

@anmaxvl anmaxvl left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants