Skip to content

Conversation

@katiewasnothere
Copy link

@katiewasnothere katiewasnothere commented Dec 10, 2020

This PR is part of the ongoing dynamic resources work. This PR adds the UVM calls to update UVM cpu limits. That call will be used in later PRs for this work.

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

@katiewasnothere katiewasnothere requested a review from a team as a code owner December 10, 2020 01:44
func (uvm *UtilityVM) UpdateCPULimits(ctx context.Context, limits *hcsschema.ProcessorLimits) error {
req := &hcsschema.ModifySettingRequest{
ResourcePath: cpuLimitsResourcePath,
Settings: *limits,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to dereference this? Can we not just assign directly?

Settings: *limits,
}

if err := uvm.modify(ctx, req); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

return uvm.modify(ctx, req)

Signed-off-by: Kathryn Baldauf <[email protected]>
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!

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.

3 participants