Skip to content

dwc2: ship the SOF hold-off (0062) off by default - #213

Merged
mcfbytes merged 1 commit into
masterfrom
fix/dwc2-holdoff-default-off
Sep 29, 2026
Merged

mcfbytes merged 1 commit into
masterfrom
fix/dwc2-holdoff-default-off

Conversation

@mcfbytes

Copy link
Copy Markdown
Owner

Makes the dwc2 SOF hold-off (0062) ship off by default, based on a non-RT 6.18.54 measurement. Refs #205.

Evidence

Measured on the 6.18.54 image with the series, toggling the hold-off live through debugfs. Setup: hub, wired pad, BT dongle and an rtw88_8822bu USB WiFi adapter, with iperf3 over WiFi. CPU0 cost is the median time of a fixed CPU0 workload, because this kernel has no IRQ time accounting.

Load CPU0 workload, on vs off complete-split misses, on vs off
idle 1,380 vs 1,384 ms 0 vs 0
WiFi send, 126 Mbit/s 4.7–5.0 vs 5.2 s same
WiFi receive, ~195 Mbit/s 8.6–13.8 vs 5.1–9.5 s (worse in 6/6 pairs) 673–730 vs 553–660 per 40 s

Off RT the hold-off gains nothing when idle and regresses under heavy USB receive. RT was never tested under bulk load. So it starts off, and the debugfs switch stays for testing: echo 1 > /sys/kernel/debug/usb/ffb40000.usb/sof_holdoff.

Change

  • 0062 no longer sets hsotg->sof_holdoff at init (the field is zero-initialised, so it starts off). The patch was regenerated from a git tree and its message records the numbers.
  • With the hold-off off, the primary handler always wakes the IRQ thread. That's the "M1 off" baseline already measured on RT (13.2%).
  • docs/dwc2-usb-irq.md: the 6.18 table, test notes (ARP flux with Ethernet and WiFi on one subnet), two new ledger rows (the bulk-receive investigation, and a 6.18 A/B for 0058), and the upstreaming section now offers nothing yet.

Verification

  • The de10nano series replays at -F0 on pristine 6.18.54 (52/52), and the beta series on 7.2.8 (54/54).
  • drivers/usb/dwc2 builds W=1-clean from both.
  • lint-kernel-patches.sh passes.
  • Not booted: the "off" behaviour is the code path already measured on both kernels.

🤖 Generated with Claude Code

Measured on the non-RT 6.18.54 image (hold-off switched live through
debugfs; hub, wired pad, BT dongle and an rtw88 USB WiFi adapter; iperf3
over WiFi):
- idle: no gain (fixed CPU0 workload 1,380 vs 1,384 ms);
- WiFi send, 126 Mbit/s: slightly better;
- WiFi receive, ~195 Mbit/s: worse in 6 of 6 pairs (8.6-13.8 s vs
  5.1-9.5 s) and ~10-15% more complete-split misses.

0062 no longer sets hsotg->sof_holdoff at init, so it starts off and is
switched on only through the debugfs file. With it off the primary
handler always wakes the thread, the behaviour already measured as the
"M1 off" baseline. The patch message and docs/dwc2-usb-irq.md record the
numbers; the ledger gains the bulk-receive investigation and a 6.18 A/B
for 0058, and the upstreaming section now offers nothing yet.

The de10nano series replays at -F0 on pristine 6.18.54 (52/52) and the
beta series on 7.2.8 (54/54); dwc2 builds W=1-clean from both;
lint-kernel-patches.sh passes.

Refs #205

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mcfbytes
mcfbytes merged commit 886a53b into master Sep 29, 2026
4 of 5 checks passed
@mcfbytes
mcfbytes deleted the fix/dwc2-holdoff-default-off branch September 29, 2026 05:03
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