-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtio-balloon: allocate 4KB-sized pages from physical memory
When inflating the memory balloon to decrease host memory usage, allocating large-sized pages from the physical memory heap is usually not effective in finding previously-used memory areas (which usually are memory ranges that have been unmapped by the user program, or pages that have been evicted from the page cache, and correspond to memory ranges that have actually been populated in the host machine); as a result, balloon inflation does not allow the host hypervisor to significantly decrease its memory usage. This change fixes the above issue by modifying the balloon driver so that it allocates minimum-sized pages when inflating the balloon; this, thanks to the MRU allocation policy of the buddy memory allocator, allows finding previously-used memory areas, which the hypervisor can then release to the host OS.
- Loading branch information
1 parent
336bd9e
commit 9c5ce16
Showing
1 changed file
with
24 additions
and
24 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