-
Notifications
You must be signed in to change notification settings - Fork 385
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
Is there any way to temporarily hang zero-page thread in windows When Deflate balloon? #1160
Comments
@yangni2017 please don’ download or use unidentified binaries!!! |
thank you remind me. Doesn't seem to have any way to disable or hang zero-page thread. So is there any way to avoid to the memory be set to zero after Deflate the balloon?Whether the flag can be set when Deflate the balloon? |
I am not sure what it will achieve. Can you please explain? On the contrary - if you want to use more advance memory over commit and not just a ballon, that will hurt KSM work https://en.wikipedia.org/wiki/Kernel_same-page_merging |
I am trying to release memory by Deflate balloon. If do not set 0, maybe can let the host see this release of memory. Just like linux, the memory used by the virtual machine is consistent with the qemu rss that the host sees at the top. |
I am sorry - I don't understand why it matters. So Linux is misreporting the memory used by the guest (deflated memory belongs to the guest, even if the guest does not use it. It is not a "free" memory of the host in any way). Why do you want to emulate Linux's bad behavior? Again - the moment you deflated the ballon, this is a FREE memory of the GUEST, but it is USED memory of the HOST. |
thanks. but I don't think it's a bad behavior.Because it can reclaim some not import vm's memory quickly when the host memory is tight,i thinck the ksm efficiency is relatively low. |
What will happen when any process on Windows will use the memory? |
i think this part of memory is only not set to zero,not indicates that the memory does not belong to the VM.If process need to use it can use it. for example, If we hibernate the vm of windows, after vm resume , the memory will be reorganized(Free memory is not be set to zero), then it can get the same behavior, process on Windows also can use the memory. So if we can let the zero-page thread to not set zero of the memory we deflated from balloon , I think we can achieve the same effect of linux. |
@yangni2017 Best, |
Hi~ Recently I wanted to reclaim windows memory through virtio balloon.When Deflate balloon, i want to emporarily hang zero-page thread to avoid writing memory to zero, if Deflate over, zero-page thread need recovery.Is there any better way?
Whether this method can solve the problem that the memory usage of the host and virtual machine is inconsistent, i want to test it,but i have not idea to hang zero-page thread.
The text was updated successfully, but these errors were encountered: