Skip to content

Compositor: the pointer's and a key's budgets, logged - #132

Merged
aoinoikaz merged 1 commit into
mainfrom
compositor-budgets
Nov 12, 2026
Merged

aoinoikaz merged 1 commit into
mainfrom
compositor-budgets

Conversation

@aoinoikaz

@aoinoikaz aoinoikaz commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

display.md D9's budgets for a pointer move and a typed key are extrapolated from the kernel's fade. Nothing measures them.

On a test disk that carries \NOVA\BUDGETS, the first process sets COMPOSITOR_OPTION_BUDGETS, and the compositor counts each frame that the pointer's motion alone damaged, or that a window's present damaged, with the pixels it composed and its time from the frame's start to its SFENCE. For every 16 frames of a kind it writes nova-compositor: budget change=pointer frames=16 pixels=4992 total_ms=10.0 max_ms=0.6, or change=present. A line is written once its frame is timed, so no frame's time holds a line's write. The system disk writes no such line.

ci/boot.py moves the tablet between two places, then types a letter and Backspace in turn, until two lines of each kind have come since it began, and prints the second, whose frames its own input made. A budget line not in rule 8's form fails any boot, as does one from a disk that is not a test disk. A figure over budget fails none.

D9 holds the figures CI measured. A typed key is within its budget at every size. The pointer's move takes up to 0.6 ms at 2880 x 1800 against 0.1 ms: the budget stays as decided and the miss is a defect, #133.

lib/budget.c holds the counting and the line; lib/line.c holds the line building it shares with lib/endpoint.c.

Checked: 75 of 75 files against SHA256SUMS; the host checks, with ci/check-boot.py at 1,096 checks; the test boot under TCG. Not checked locally: the KVM boots and CI's compilers.

Closes #76

@aoinoikaz
aoinoikaz force-pushed the init-compositor-connect-deadline branch from e68b942 to 8430cbc Compare November 12, 2026 16:44
Base automatically changed from init-compositor-connect-deadline to main November 12, 2026 16:45
The compositor counts each frame that the pointer's motion alone
damaged, and each that a window's present damaged, with the pixels it
composed and its time from the frame's start to its SFENCE, and writes
the budget line of display.md D19's rule 8 for every BUDGET_FRAMES
frames of a kind. It does so only where its options hold
COMPOSITOR_OPTION_BUDGETS, which the first process sets on a test disk
that carries the flag file \NOVA\BUDGETS. The system disk carries none,
and its compositor counts nothing.

lib/budget.c holds which change a frame is counted under, the tally of
each kind and the line's text, and compose_frame returns the pixels it
composed. lib/line.c holds the building of a log line, which
lib/endpoint.c and lib/budget.c share.

On a test disk's boot that has logged in through the console's window,
ci/boot.py moves the tablet between two places, then types a letter and
Backspace in turn, until the line of each kind has come twice since it
began, and prints the second, whose frames its own input made. A budget
line that is not in the rule's form fails any boot, and so does one on
a disk that is not a test disk.

D9 holds the figures CI measured under KVM at three sizes and under TCG
at 1280 x 800. A typed key is within its budget at every size. The
pointer's move takes up to 0.6 ms at 2880 x 1800 against a budget of
0.1 ms, which D9 keeps. Rule 8's example is the line measured there:
its 4,992 pixels are two images of three blocks across, where the rule
had the images' own 36 x 52, which no frame composes.

tools/check-budget.c checks the library against the rule on the host,
tools/check-compose.c the count a frame returns against the pixels it
wrote, and ci/check-boot.py which budget lines boot.py takes and
prints.
@aoinoikaz
aoinoikaz marked this pull request as ready for review November 12, 2026 17:36
@aoinoikaz
aoinoikaz merged commit 25ce815 into main Nov 12, 2026
23 checks passed
@aoinoikaz
aoinoikaz deleted the compositor-budgets branch November 12, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compositor: the pointer's and a key's budgets, logged

1 participant