Skip to content

Commit 54ff38c

Browse files
authored
Merge branch 'main' into 4534
2 parents 34a4314 + 994198b commit 54ff38c

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

docs/ballooning.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,20 @@ cannot be enabled later by providing a `polling_interval` non-zero value.
263263
Furthermore, if the balloon was configured with statistics pre-boot through a
264264
non-zero `stats_polling_interval_s` value, the statistics cannot be disabled
265265
through a `polling_interval` value of zero post-boot.
266+
267+
## Balloon Caveats
268+
269+
- Firecracker has no control over the speed of inflation or deflation; this is
270+
dictated by the guest kernel driver.
271+
272+
- The balloon will continually attempt to reach its target size, which can be a
273+
CPU-intensive process. It is therefore recommended to set realistic targets
274+
or, after a period of stagnation in the inflation, update the target size to
275+
be close to the inflated size.
276+
277+
- The `deflate_on_oom` flag is a mechanism to prevent the guest from crashing or
278+
terminating processes; it is not meant to be used continually to free memory.
279+
Doing this will be a CPU-intensive process, as the balloon driver is designed
280+
to deflate and release memory slowly. This is also compounded if the balloon
281+
has yet to reach its target size, as it will attempt to inflate while also
282+
deflating.

tests/integration_tests/functional/test_kvm_ptp.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
import pytest
77

88

9-
def test_kvm_ptp(uvm_plain_any):
9+
def test_kvm_ptp(uvm_any_booted):
1010
"""Test kvm_ptp is usable"""
1111

12-
vm = uvm_plain_any
12+
vm = uvm_any_booted
1313
if vm.guest_kernel_version[:2] < (6, 1):
1414
pytest.skip("Only supported in kernel 6.1 and after")
1515

16-
vm.spawn()
17-
vm.basic_config(vcpu_count=2, mem_size_mib=256)
18-
vm.add_net_iface()
19-
vm.start()
16+
_, dmesg, _ = vm.ssh.check_output("dmesg |grep -i ptp")
17+
assert "PTP clock support registered" in dmesg
2018

21-
vm.ssh.check_output("[ -c /dev/ptp0 ]")
19+
# wait up to 5s to see the PTP device
20+
vm.ssh.check_output("udevadm wait -t 5 /dev/ptp0")
2221

2322
# phc_ctl[14515.127]: clock time is 1697545854.728335694 or Tue Oct 17 12:30:54 2023
2423
vm.ssh.check_output("phc_ctl /dev/ptp0 -- get")

0 commit comments

Comments
 (0)