Repository navigation
Improvement: a CPU budget admits Octatrack machines before they play - #1482
Merged
Merged
Conversation
A Part's ColdFire machines are added up against an allowance at each pick and each UI tick. A pick past it is refused with a CPU FULL box; a track past it after a load renders stock's silent source. The frame guard stays as the backstop. Prices and the allowance are estimates until measured on a unit (npm run device -- cpu); the base is not regenerated yet. Co-Authored-By: Claude <noreply@anthropic.com>
…lt with the CPU budget Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ox builds on the host, and the base follows Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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.
What was wrong or hard: Machines that render on the ColdFire had no admission. The frame guard only drops renders once the frame interrupt is over its share, so a musician with too many machines heard dropouts (or met a DSP stall) and never a refusal, unlike DSP effects, which are refused with a box.
What this changes: The base bills machines the way it bills DSP effects, with declared prices, not live measurement.
reserved[0]ofstruct modwerk_machine, in percent of a frame (no ABI change); a machine that names none costs 12, a DSP-voice machine 0. The allowance for added machines is 45 % of a frame.npm run device -- cpureads the bill and the longest render per track on a dev twin;cpu:PERCENTsets the allowance for a test. A refusal reaches diagnostics as incidentcpu, anddiagnostics:pullprints it.5ef4d447; the five base-bound packages are relinked to it, their code unchanged.How I checked it:
npm run pr:readysays Ready on main28a2fc312(host tests cover the bill, the refusal, the box and the diagnostics record). On the owner's MKII, RAM-booted dev twins of this branch (e609a796;dfbf58d6with a temporary trace that is not in the branch), OS 1.40C:5ef4d447itself was not run on a unit, only its dev twins. One run with FM Synth, POLY8 and VECTOR installed and an 8-track pattern ended in a DSP stall ("frames stopped", frame max 163 %, the guard skipped nothing): the budget does not prevent that case yet, see the next point.What the guides lacked or got wrong, and where I fixed it: they did not cover a CPU price or how to read it on a unit; fixed in two guides, three traps are noted but not fixed here.
docs/MODULE_PERFORMANCE.md: the CPU price and how to read it withcpu.docs/OCTATRACK_DRIVING.md: thecpustep.modwerk_events.his generated fromevents.json, which nothing says at the header;octatrack:module-packages --base-onlyskips Sidechain's lagging row, which then needs the new base identity by hand;check_mcf54455reads a switch's jump table as instructions (worked around instatus.cwithno-jump-tableson one function; the check wants its ownFix:).🤖 Generated with Claude Code