-
Notifications
You must be signed in to change notification settings - Fork 275
Support assigning cpugroup immediately after UVM start #888
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
Support assigning cpugroup immediately after UVM start #888
Conversation
6aba54d to
6b8bb2f
Compare
6b8bb2f to
2678abe
Compare
2678abe to
a9cf4d1
Compare
3294bc7 to
47845df
Compare
| @@ -0,0 +1,121 @@ | |||
| package uvm | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
47845df to
8e78880
Compare
b8689b3 to
b08f737
Compare
internal/cpugroup/cpugroup.go
Outdated
| 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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
dcantah
left a comment
There was a problem hiding this 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
Signed-off-by: Kathryn Baldauf <[email protected]>
b08f737 to
bac6480
Compare
anmaxvl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related work items: microsoft#173, microsoft#839, microsoft#856, microsoft#877, microsoft#881, microsoft#886, microsoft#887, microsoft#888, microsoft#889, microsoft#890, microsoft#893, microsoft#894, microsoft#896, microsoft#899, microsoft#900, microsoft#902, microsoft#904, microsoft#905, microsoft#906, microsoft#907, microsoft#908, microsoft#910, microsoft#912, microsoft#913, microsoft#914, microsoft#916, microsoft#918, microsoft#923, microsoft#925, microsoft#926, microsoft#928, microsoft#929, microsoft#932, microsoft#933, microsoft#934, microsoft#938, microsoft#939, microsoft#942, microsoft#943, microsoft#945, microsoft#946, microsoft#947, microsoft#949, microsoft#951, microsoft#952, microsoft#954
…ate_on_start Support assigning cpugroup immediately after UVM start
This PR adds a new annotation
io.microsoft.virtualmachine.cpugroup.idfor 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]