Commit 1ca36f2
committed
virtio-balloon: Add free page hinting
Free page hinting is a mechanism which allows the guest driver to report
ranges of pages to the host device. A "hinting" run is triggered by the
device by issuing a new command id in the config space, after the update
to the id the device will hint ranges to the host which are unused. Once
the driver has exhausted all free ranges it notifies the device the run
has completed. The device can then issue another command allowing the
guest to reclaim these pages.
Adding support for hinting the firecracker balloon device, we offer
three points to manage the device; first to start a run, second to
monitor the status and a final to issue the command to allow the guest
to reclaim pages.
To note, there is a potential condition in the linux driver which would
allow a range to be reclaimed in an oom scenario before we remove the
range.
Signed-off-by: Jack Thomson <[email protected]>1 parent 5c9e4c7 commit 1ca36f2
File tree
11 files changed
+330
-34
lines changed- src/vmm/src
- device_manager
- devices/virtio/balloon
- vmm_config
- tests/integration_tests/functional
11 files changed
+330
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
| 1234 | + | |
1234 | 1235 | | |
1235 | 1236 | | |
1236 | 1237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| 648 | + | |
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
| |||
730 | 731 | | |
731 | 732 | | |
732 | 733 | | |
| 734 | + | |
733 | 735 | | |
734 | 736 | | |
735 | 737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
| 672 | + | |
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
| |||
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| 754 | + | |
753 | 755 | | |
754 | 756 | | |
755 | 757 | | |
| |||
0 commit comments