The tail stall: rescuing a stranded Thunderbolt ACK, 3945µs → 208µs
The short final frame of every multi-fragment WQE stranded its SEND_ACK on the Asahi NHI, and the QP retry ladder took 73–143ms to notice. An immortal poll and an 800µs rescue took 8097B pingpong from 3945 to 208 µs per iteration. The session also hit a perftest version mismatch, an unsteerable AIC2 and a volume that corrupts builds.

- Was called
- a stall at the tail
- Was
- the short final frame's stranded SEND_ACK
This session targeted the Thunderbolt 4 RDMA leg between an M2 Ultra Mac Studio running Asahi's 7.1.13-usb4gpu kernel (the Mac Studio in the diagram below) and an AMD Strix Halo desktop. The reference numbers belong to MCDMA, who connect a Mac Studio to DGX Sparks and publish:
| MCDMA (Mac Studio ↔ DGX Sparks) | published |
|---|---|
| 4 KiB RDMA WRITE | 3.68 µs |
| sustained READ | 50.6 Gbit/s |
MCDMA's roadmap asks for "Strix Halo + Vulkan — hardware sought." That is the setup already cabled on this bench. The session produced five results: one link restored from cold, one negotiation blocker, one real bug found and fixed, one kernel patch left parked at a GRUB menu, and one storage volume that has been corrupting everything built on it.
Restoring the link
The leg had been down, so the first hours went to restoring it. The existing playbook held: staged-boot module discipline on both ends, and canonical per-leg configurations applied by tbv-configure-leg.sh so that neither host drifts into a configuration only one of them remembers.
The one real fault was a subnet mismatch. The fix was a secondary address on the interface plus permanent neighbors, so ARP never has to rediscover a peer. A plain ping across the Thunderbolt cable then settled at 0.23 ms, and the transport was no longer a variable.
perftest wire format mismatch
The benchmark tooling failed before the hardware did. Four perftest binaries were in use across the two machines, and three of them claimed version 6.29. Every pair failed negotiation. The version strings matched and the wire formats did not. The fix was to build one source revision, perftest-master (version 6.30), on both architectures and retire the rest.
With a common wire format, ib_write_bw finally produced a number:
| measurement | value |
|---|---|
| ib_write_bw, 256 KiB peak | 938 MiB/s ≈ 7.87 Gbit/s |
| record, 2026-09-15 | 995.93 MiB/s = 8.36 Gbit/s |
| gap | within 6% |
Being within 6% of the previous record is not an improvement, but it is a working baseline that agrees with history, which a benchmark harness needs before the kernel changes.
The tail stall
Every multi-fragment WQE ends with a short final frame, last_len=4048, which is 4096 minus the 48-byte header. That frame's SEND_ACK was repeatedly stranded on the Mac Studio's Asahi NHI without an interrupt, so the receiving path never noticed it had arrived. The supplemental RX poll had quit 16 ms after the last TX post. Past that point recovery fell to the QP retry ladder, which eventually released the ACK at 73–143 ms per stall. Every multi-fragment transfer paid that tail.
The patch has three parts:
- An immortal supplemental poll with a 1 ms idle cadence, so the receive path never stops polling.
- A fast ACK-wait rescue,
tx_ack_rescue_us=800, which checks a sender waiting on an ACK at 800 µs instead of at retry-timer scale. - Hardening around the edges: the NULL-path timeout reaper no longer emits wire ACKs, and rings are quiesced before
tb_ring_stop.
Measured before and after:
| probe | before the patch | after |
|---|---|---|
| 8097-byte pingpong | 3945 µs/iter | 208 µs/iter (19×) |
| 64 KiB write | hang | completes |
| 1 MiB write | crashed the host, five times | survives |
The hardening has a further effect: rmmod on the Strix Halo host with the rail live is now survivable, which it was not before. The 64 KiB case going from "hang" to "completes" and the 1 MiB case going from "five host crashes" to "survives" separate a demo from a fabric that can be left switched on.
Latency ladder
With the tail gone, the latency ladder became readable. The 2-byte RTT dropped from 29.9 µs to 26.3 µs, and the driver was not the cause. The Strix Halo host had been on the powersave governor.
| rung | measured |
|---|---|
| 2-byte RTT, before | 29.9 µs |
| 2-byte RTT, governor fixed | 26.3 µs |
| busy-poll CQ floor, min | 1.99–3.12 µs |
| p50 through the kernel path | ~20 µs |
| 4000-byte busy-poll throughput | 2157 Mbit/s |
The busy-poll CQ harness is the rung that matters. Polling the completion queue directly, the floor min lands at 1.99–3.12 µs, which is the hardware answering without kernel mediation. Sub-5 µs RTT on this leg is therefore reachable if the software between the application and the CQ stops adding latency. That software currently costs a p50 of ~20 µs, attributed to kernel reap latency, though this session did not isolate it. The gap between 2 µs of hardware and 20 µs of p50 is the remaining work.
AIC2: interrupts cannot be steered
The tail-stall investigation turned up a second, independent problem in Apple's interrupt controller driver. aic2_chip has no .irq_set_affinity implementation, so every Apple AIC2 interrupt returns EPERM when steering is attempted, including the NHI ring interrupts this workload depends on. The cause is structural. AIC1 kept per-CPU targets in a TARGET_CPU bank, while AIC2 stores each IRQ's target individually in IRQ_CFG[TARGET], GENMASK(3,0), and the affinity infrastructure was written for the former.
A kernel patch was written. The install then failed: the boot attempt used the wrong artifact, the zboot vmlinuz instead of Image.gz, and the boot failed. The safety net worked as designed. The Mac Studio parked at the GRUB menu with the old kernel preserved at .aicbak.
Status: patch built, steering unverified, recovery pending. No AIC2 improvement is claimed until the Mac Studio boots the patched kernel and the NHI ring IRQs move when asked.
A volume that corrupts builds
The fast shared build volume is actively corrupting file data. Files that had been repaired reverted to their broken state, and kernel sources grew binary junk. The failure is easy to recognize once known, but it looks like compiler trouble.
The workaround is to freeze a clean source copy on the root NVMe and build there. The volume needs fsck and SMART checks before it is trusted again. Every phantom build failure earlier in the day traces to this cause and not to the compiler or the code.
What worked and what did not
Worked: kernel-adjacent debugging with a KVM console as the only view of the machine. When the host crashes at the NHI boundary, logs after the fact are incomplete, and the console shows what happened.
Did not work:
rmmodon the Mac Studio crashed it instantly, every time.- Live
rmmodin general panics the host. - A runaway log filled a tmpfs with 77 GB and took down whatever else shared that filesystem.
Forbidden until guarded: the RDMA READ verb. Issuing it crashes both hosts. The native backend does not implement it, and there is no graceful refusal on the wire. READ is not issued on this fabric until that path is guarded.
Next steps
Three items, in order:
- Boot the Mac Studio from the preserved
.aicbakkernel, retry the AIC2 patch install with the correct Image.gzartifact, and verify that NHI ring interrupts steer. - Reconcile the write bandwidth average with its peak. A 7.87 Gbit/s peak next to a lower average suggests the same tail-stall pattern in a different unit.
- Run fsck and SMART on the build volume.
The hardware floor is 2 µs and the kernel currently charges twenty. The gap between the two is now documented, and most of it has a patch attached.
