Repository navigation
lanes: an input clock is cut no further than the cap, ticks taken in turns; the host's plane textures kept - #18
Merged
Merged
Conversation
… runs a tick at a time takes its ticks in turns An audio clock ticks every `window` samples, so foundmeat's listen_audio, with a window of one sample, was cut 1024 ticks by every packet of 1024 samples and queued them all at once: the 1023 tasks against a cap of 10 in their trace. Every tick cost a turn of the scheduler and a wake of every waiting thread, about 48 us of CPU, so the lane needed 2.3 cores to keep up with 48000 ticks a second and fell behind when the box was busy. Its reader carries the programme's own sound, so the programme slowed with it. The cut now stops at the cap and holds the next settled tick back, the lane counts as full to its readers while it does, and the rest is cut as the queue drains. A lane that runs one tick at a time takes the ticks queued behind the one it starts, and those its clock settled past the cap, up to 1024, in one turn. The progress marks of a turn leave once, and a lane with a tick held back is picked first. listen_audio alone now runs at 4.0 times real time with 0.32 cores of CPU, where it ran at 0.84 times with 3.7 cores. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e packets behind it, not the ticks A packet of 1024 samples settles 1024 ticks of a clock cut a sample a tick, so a lane holding ticks back did so after every packet, and the reader that carries the programme's sound beside its copy waited every 21 ms for the lane to be handed the rest. While ticks are held back, the packets waiting on such a clock count against the cap, and its reader waits once the lane is that many packets behind. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tener on a clock cut a sample a tick Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The ticks of the turn after the one it finished on are skipped, as a lane that stops drops its queue, a last tick queued behind them goes with them, and the last call is made by the instance that finished. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… shipped in 0.32.1 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e same size and format Every conversion on the device and every upload made new textures and dropped them with the frame, an allocation and a free in the driver at each frame. The textures the host makes are now kept, up to four free of each size and format, and handed to the next plane; a module's texture a frame owns is dropped as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit f3c5b0e)
…es left unmerged Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
imbcmdth
force-pushed
the
lanes-and-planes
branch
from
October 19, 2026 20:52
ab1b912 to
1a44539
Compare
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.
The scheduler let an input clock's cut queue every settled tick at once: a node clocked by sound with a window of one sample (foundmeat's listener on the programme's sound) was cut 1024 ticks by every packet, 48,000 a second, and every dispatch and completion woke every worker. Measured on foundmeat's box (perf, strace, gdb): 1.34 cores for an idle broadcast on 0.32.1, 61% of it the kernel, each worker making about 30,000 context switches a second; the 1023-task queue in their traces was the same lane.
lanes: an input clock's cut stops at the cap and holds the next settled tick back, the lane counting as full while it does; a lane that runs one tick at a time takes the ticks queued behind the one it starts, up to 1024, in one turn, and a turn's progress marks leave once; the reader of an audio clock with ticks held back waits on the packets behind it, not the ticks. The a6a649c memory bound stays and gets the test it lacked. Unit tests for the cap, the turns, the self-clocked bound, and a node finishing or failing mid-turn; a live test that a node clocked a sample a tick keeps the programme in real time.gpu: the plane textures the host makes for conversions and uploads are kept and reused, up to four free per size and format.fix/linux-route-cpustay unmerged (within noise, and resting on an undocumented wgpu-core lock).On the box: idle broadcast 1.34 → 0.99 cores with the lane change, 0.92 with the planes kept (the Windows figure); with a 1080p60 feed 1.51 → 0.95; real time held in every run; the two-loop node_shapes stress 0 of 50 hung on the combined head (the earlier hangs were the start-up waker, fixed in 0.32.2).
🤖 Generated with Claude Code