~/bend-docscommunity

src/virtio/balauto.bend checks

raw source on the hub · import 0x5fb57f1b8ad4cb61031f616c44af7445/src/virtio/balauto.bend as Balauto

2 imports
import Base
import ../lib/bytes.bend as B

Types

type Stats source · line 32 · raw

Data

Definitions

def Auto.none source · line 35 · raw

U32

def Auto.period_ms source · line 39 · raw

U32

def Auto.start_ms source · line 45 · raw

U32

The first poll waits this long after the VM starts: the balloon stays out of the guest's way while it boots and starts its work (inflating takes guest CPU: an upload in the guest's first seconds ran 19% slower).

def Auto.slack source · line 48 · raw

U32

def Auto.step source · line 52 · raw

U32

def Auto.floor source · line 56 · raw

@+total:U32 -> U32

def Auto.most source · line 61 · raw

@+total:U32 -> U32

The most the balloon holds: half the guest's RAM.

def Auto.pages source · line 65 · raw

@+lo:U32 -> @+hi:U32 -> U32

A byte count in pages, saturated at 2^32 - 1.

def Auto.entry source · line 68 · raw

@+tag:U32 -> @+v:U32 -> @+st:Stats -> Stats

def Auto.stats.go source · line 77 · raw

@fuel:Nat -> @+bs:List<&2, U32> -> @+st:Stats -> Stats

The statistics in a buffer's bytes (entries past the last whole one are ignored; a tag not given keeps its value from st).

def Auto.stats source · line 86 · raw

@+bs:List<&2, U32> -> @+st:Stats -> Stats

def Auto.fresh source · line 89 · raw

Stats

def Auto.grow source · line 92 · raw

@+free:U32 -> @+floor:U32 -> @+target:U32 -> @+most:U32 -> U32

def Auto.shrink source · line 95 · raw

@+free:U32 -> @+floor:U32 -> @+target:U32 -> U32

def Auto.target source · line 103 · raw

@+st:Stats -> @+target:U32 -> U32

The balloon's next target from the guest's statistics and the current one: its target, or what it holds when the guest took pages back (DEFLATE_ON_OOM) and it holds less (a guest that reported no total: unchanged).