Repository navigation
scsi, audio: activity counters a front-end can sample for device lights - #797
Open
danifunker wants to merge 2 commits into
Open
danifunker wants to merge 2 commits into
danifunker wants to merge 2 commits into
Conversation
Each SCSI bus keeps per-id counters of completed reads and writes (commands and bytes), outside the target table's lock, so a status poll never waits for a disk command. A target takes its id's counters when it is attached. Workstation::disk_activity returns them per disk bus on every machine. Device::audio_frames reports the frames a sound card has moved; the monitor sums the cards and Workstation::audio_frames returns the total. Both only go up; a front-end compares two samples. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
Author
|
This will be a prerequisite for the new GUI re-vamp |
A tile's hand-over between its owner and the producer can strand a job, so the producer waits for ever. The findings and a candidate fix are in clanker/plans/kona-tile-handoff-race.md; the test comes back with the fix. Co-Authored-By: Claude Fable 5.2 <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.
Adds counters a front-end can poll to draw per-device activity lights. Nothing user-visible changes yet; this is the core half, ahead of GUI work that will read them.
Disks
ScsiBuskeeps per-id counters of completed reads and writes (commands and bytes). A target takes its id's counters when it is attached;ScsiDevicebumps them when a read or write completes.ScsiBus::activity()never waits behind a disk command.Workstation::disk_activity()returns them per disk bus, in the order the machine numbers its SCSI controllers (then NVMe and Fibre Channel where it has them). Implemented for the Indy/Indigo2, O2, Octane and the SN machines.Audio
Device::audio_frames()reports the frames a sound card has moved (HAL2, MACE audio, RAD1, ICE1724), from the meters the cards already keep.Monitor::audio_frames()sums the cards;Workstation::audio_frames()returns the total,Noneon a machine with no sound card.Both counts only go up, so a front-end compares two samples.
Not included
HACKING.mdmentions the new hooks.Testing
scsi::bus::tests::activity_counts_completed_reads_and_writes_per_idand anaudio_framescheck in the monitor's sound-card test.scsi::andmonitor::unit tests pass andiris-guitype-checks. No guest was booted.🤖 Generated with Claude Code