Repository navigation
Compositor: the pointer's and a key's budgets, logged - #132
Merged
Merged
Conversation
aoinoikaz
force-pushed
the
init-compositor-connect-deadline
branch
from
November 12, 2026 16:44
e68b942 to
8430cbc
Compare
aoinoikaz
force-pushed
the
compositor-budgets
branch
from
November 12, 2026 16:45
4f099f4 to
c2fd703
Compare
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
force-pushed
the
compositor-budgets
branch
from
November 12, 2026 17:02
c2fd703 to
4b6b1f2
Compare
aoinoikaz
marked this pull request as ready for review
November 12, 2026 17:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 setsCOMPOSITOR_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 itsSFENCE. For every 16 frames of a kind it writesnova-compositor: budget change=pointer frames=16 pixels=4992 total_ms=10.0 max_ms=0.6, orchange=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.pymoves 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.cholds the counting and the line;lib/line.cholds the line building it shares withlib/endpoint.c.Checked: 75 of 75 files against
SHA256SUMS; the host checks, withci/check-boot.pyat 1,096 checks; the test boot under TCG. Not checked locally: the KVM boots and CI's compilers.Closes #76