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

Adding ballooning support #207

Merged
1 commit merged into from
May 25, 2022
Merged

Adding ballooning support #207

1 commit merged into from
May 25, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 24, 2022

Please describe the change you are making

Adding support for memory ballooning. It also changes the return of the MemoryPolicy() function as I discovered that it is always present.

Are you the owner of the code you are sending in, or do you have permission of the owner?

Yes

The code will be published under the BSD 3 clause license. Have you read and understood this license?

Yes

@ghost ghost force-pushed the ballooning branch 2 times, most recently from 646429e to adf38ca Compare May 24, 2022 16:00
@ghost ghost enabled auto-merge (rebase) May 24, 2022 16:03
@ghost ghost requested review from engelmi and eslutsky May 25, 2022 06:17
Copy link
Contributor

@eslutsky eslutsky left a comment

Choose a reason for hiding this comment

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

can we implement any tests for this ?

@ghost ghost requested a review from eslutsky May 25, 2022 09:00
@ghost
Copy link
Author

ghost commented May 25, 2022

can we implement any tests for this ?

done

vm.go Outdated Show resolved Hide resolved
@ghost ghost requested a review from engelmi May 25, 2022 09:31
memoryPolicy := vm.MemoryPolicy()
ballooning := memoryPolicy.Ballooning()
if ballooning != testCase.expected {
t.Fatalf("Incorrect ballooning value")
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: If we make this Fatalf more expressive, it'll be easier to figure out what is wrong. E.g.

t.Fatalf("Expected balooning value to be %t, but got %t", testCase.expected, balooning)

@ghost ghost merged commit 4e5fd84 into main May 25, 2022
@ghost ghost deleted the ballooning branch May 25, 2022 09:39
This pull request was closed.
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.

2 participants