F18: fix AHCI CI-level completion drain#307
Open
ryanbreen wants to merge 3 commits intodiagnostic-fix/f17-local-wakefrom
Open
F18: fix AHCI CI-level completion drain#307ryanbreen wants to merge 3 commits intodiagnostic-fix/f17-local-wakefrom
ryanbreen wants to merge 3 commits intodiagnostic-fix/f17-local-wakefrom
Conversation
Audit: the F17 Breenix handler was edge-sensitive. It read PORT_IS, acknowledged PORT_IS/HBA_IS through ack_port_interrupt(), then read PORT_CI once and completed at most the slot implied by that single interrupt-status sample. A completion that cleared PORT_CI around that one-shot status sample could leave PORT_CI clear while no waiter was woken. Linux v6.8 uses the level-sensitive model in drivers/ata/libahci.c: ahci_port_intr() acknowledges PORT_IRQ_STAT, ahci_handle_port_interrupt() delegates command completion to ahci_qc_complete(), and ahci_qc_complete() reads PORT_CMD_ISSUE/PORT_SCR_ACT into qc_active before calling ata_qc_complete_multiple(). That derives completion from hardware-active state rather than relying on a single interrupt edge; SERR/error handling remains separate before normal command completion. Fix: loop each active AHCI port up to eight times, compute completed slots as PORT_ACTIVE_MASK & !PORT_CI, clear active bits atomically, acknowledge sampled PORT_IS, then re-read PORT_IS and PORT_CI and continue if the port reasserted or another active slot has cleared. Slot-0 wake publication is deferred until after the port is stable, preventing the woken waiter from issuing the next command while the prior AHCI interrupt line remains asserted. The existing single-active-slot interrupt fallback is preserved, and CI loop iterations are emitted as AHCI_RING site=CI_LOOP with token=<iteration>. Co-authored-by: Ryan Breen <ryan@ryanbreen.com> Co-authored-by: Claude Code <noreply@anthropic.com>
Five final ./run.sh --parallels --test 60 runs reached bsshd with zero AHCI timeouts and zero corruption markers by serial-log criteria. The run.sh process still exits 1 because the Parallels screenshot helper cannot find the generated VM window, matching prior F-series sweeps where serial output is the validation source. Co-authored-by: Ryan Breen <ryan@ryanbreen.com> Co-authored-by: Claude Code <noreply@anthropic.com>
Record the F18 audit, Linux AHCI reference, CI-level completion fix, final 5/5 Parallels sweep, and cleanup recommendation. The exit report is preserved with the run artifacts for validator handoff. Co-authored-by: Ryan Breen <ryan@ryanbreen.com> Co-authored-by: Claude Code <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.
Summary
Validation
Note: run.sh exits 1 because the Parallels screenshot helper cannot find the generated VM window; serial logs are the validation source, consistent with previous F-series sweeps.