forked from QubesOS/qubes-core-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qmemman: handle memory assigned to VM but not yet used
When VM got some memory assigned, balloon driver may not pick it up immediatelly and the memory will still be seen as "free" by Xen, but VM can use (request) it at any time. Qmemman needs to take care of such memory (exclude it from "free" pool), otherwise it would redistribute it to other domains, allowing the original domain to drain Xen memory pool. Do this by redefining DomainState.memory_actual - it is now amount of memory available to the VM (currently used, or possibly used). Then calculate free memory by subtracting memory allocated but not used (memory_target-memory_current). Fixes QubesOS/qubes-issues#1389
- Loading branch information
Showing
2 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters