Skip to content

Ignore unknown link speed in homa_qdev_update_sysctl - #23

Draft
randomizedcoder wants to merge 1 commit into
mainfrom
fix/qdisc-unknown-link-speed
Draft

randomizedcoder wants to merge 1 commit into
mainfrom
fix/qdisc-unknown-link-speed

Conversation

@randomizedcoder

Copy link
Copy Markdown
Owner
  • virtio_net (and other drivers without a known speed) reports SPEED_UNKNOWN (-1) from get_link_ksettings; homa_qdev_update_sysctl used it, giving link_mbps -1 and a negative max_nic_queue_bytes.
  • Result: every deferrable packet is deferred and never sent. With the homa qdisc on a virtio NIC, echo, cp_node Homa and TCP all stall (0 Kops, ~1170 RESENDs, pacer_homa_packets 0).
  • A speed of 0 would divide by zero in the cycles_per_mibyte calculation.
  • Fix: fall back to homa->link_mbps for 0 and SPEED_UNKNOWN.
  • Test: homa_qdev_update_sysctl__link_speed_unknown (red: link_mbps -1, cycles_per_mibyte 1953; green: 885/885).
  • Found by: two-VM pair lifecycle with the homa qdisc on eth1 (round-4 candidate 5).

🤖 Generated with Claude Code

Drivers that don't know the link speed, such as virtio_net, report
SPEED_UNKNOWN (-1) from get_link_ksettings. homa_qdev_update_sysctl
used it as is, giving link_mbps -1 and a negative max_nic_queue_bytes,
so every deferrable packet was deferred and the pacer never sent it:
with the homa qdisc on a virtio NIC, large Homa messages and TCP
stalled. A speed of 0 would divide by zero. Fall back to
homa->link_mbps in both cases.

Found by running two VMs with the homa qdisc on their virtio NICs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
randomizedcoder added a commit that referenced this pull request Oct 30, 2026
homa-qdisc (qdisc.nix) attaches Homa's qdisc to eth1 of each pair
node. Pair lifecycle phases 10-12 run traffic through it, then with
net.homa.link_mbps=1000 so the pacer must defer and send packets, then
restore the default qdisc. New counters: qdisc_tcp_packets,
pacer_homa_packets, pacer_tcp_packets.

This reproduced round-4 candidate 5 in VMs: virtio-net reports
SPEED_UNKNOWN, the qdisc takes link_mbps as -1, and echo, Homa and TCP
all stall (STATUS.md F11). With the fix (fork #23) all 39 phases pass
on 7.3 and 6.12, and homa-vm-matrix is 10/10.

Also: echo output goes to a file (timeout's SIGTERM killed the grep in
the pipeline), and cp_node counts as progressing when it reports a P99,
since TCP's Kops at 5 % loss can round to 0.00.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant