Skip to content

Commit f0a35a1

Browse files
kalyazinclaude
andcommitted
docs(balloon): document WAIT_ON_ACK feature
Add a subsection under free_page_hinting describing the behaviour of VIRTIO_BALLOON_F_HINT_WAIT_ON_ACK: always advertised alongside FPH, self-cleared by guests without the supporting kernel patch, no separate config knob, and a note on the per-buffer round-trip cost on supported guests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
1 parent 1bfffbf commit f0a35a1

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docs/ballooning.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,26 @@ your scenario.
465465
>
466466
> This will prevent ranges which have been reclaimed from being freed.
467467
468+
#### `VIRTIO_BALLOON_F_HINT_WAIT_ON_ACK`
469+
470+
Whenever `free_page_hinting` is enabled, Firecracker also advertises
471+
`VIRTIO_BALLOON_F_HINT_WAIT_ON_ACK` (bit 6). When negotiated, the guest
472+
driver waits for the device to signal-used each hint buffer before
473+
pushing the corresponding page onto its internal free list — closing
474+
the data-loss race described in the warning above without any host-side
475+
protocol change.
476+
477+
The bit only takes effect on guests whose kernel carries the supporting
478+
patch (Jack Thomson's `virtio_balloon: Support wait on ACK for hinting`,
479+
not yet upstream as of this writing). On unsupported guests the driver
480+
self-clears the bit during `validate`, so the advertise is ignored and
481+
hinting falls back to the unsynchronised behaviour. There is no separate
482+
configuration knob — opting into `free_page_hinting` is sufficient.
483+
484+
Note that the per-buffer round trip introduces extra wait time per hint
485+
cycle on supported guests; the safety/perf trade-off is intentional and
486+
documented at the kernel-patch level.
487+
468488
## Balloon Caveats
469489

470490
- Firecracker has no control over the speed of inflation or deflation; this is

0 commit comments

Comments
 (0)