From: Ping-Ke Shih <pkshih@realtek.com>
To: Lucid Duck <lucid_duck@justthetip.ca>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Subject: RE: [PATCH v2] wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs
Date: Tue, 24 Mar 2026 00:38:12 +0000 [thread overview]
Message-ID: <701291fc012b49979b1fb25b8d765d65@realtek.com> (raw)
In-Reply-To: <20260323233334.158678-1-lucid_duck@justthetip.ca>
Lucid Duck <lucid_duck@justthetip.ca> wrote:
> Hi Ping-Ke,
>
> Thank you for the review. Answers to each point below.
>
> Mailer: I use a direct SMTP script -- git send-email had a hang
> issue on Fedora 43 that has since been resolved. v3 is sent via
> git send-email. The patch applies cleanly with git am.
>
> Uplink data (USB3 5GHz, 10 runs each, DWA-X1850 RTL8832AU,
> kernel 6.19.8):
>
> Unpatched Patched-32 Patched-64
> UL avg: 844 Mbps 763 Mbps 840 Mbps
> UL retransmits: 3 0 0
If you have RTL8832CU, can you have additional test on 160 MHz bandwidth?
>
> 32 URBs shows a ~10% upload regression on USB3 5GHz. 64 URBs
> recovers to stock with zero retransmits.
>
> > Can increasing 32 get better performance? The stress test with
> > small packets might yield low throughput?
>
> Yes. I tested 32, 64, and 128 URBs per channel. The difference
> is most visible under parallel streams (USB3 5GHz upload):
>
> Stock 32 URBs 64 URBs 128 URBs
> 4-stream: 858 556 837 849
> 8-stream: 872 565 830 833
Not sure if people want 128 URBs to have a few better performance.
For me, if there is no objection or restriction, I'd take 128
because this driver can support RTL8832CU working on 160MHz
bandwidth, which maximum throughput is twice of RTL8852AU.
>
> 32 URBs drops 35% under multi-stream load. 64 URBs recovers
> fully. 128 URBs shows no further gain -- 64 is the sweet spot
> for USB3.
>
> On USB2, URB count does not matter -- the bus is the bottleneck:
>
> Stock 32 URBs 64 URBs 128 URBs
> UL avg (USB2): 250 252 248 253
>
> Small packets (USB3 5GHz upload, 3 runs each avg Mbps):
>
> Stock 32 URBs 64 URBs
> 64 bytes: 139 128 126
> 256 bytes: 441 444 442
> 1024 bytes: 845 786 846
>
> Small packets are CPU/USB-framing limited, not URB-count limited.
> No throughput difference at 64 or 256 bytes. At 1024 bytes, 32
> URBs constrains throughput; 64 recovers.
>
> > Out of curiosity. Is it possible inflight >
> > RTW89_USB_MAX_TX_URBS_PER_CH?
>
> No. check_and_reclaim is called before tx_kick_off, and each call
> submits at most one URB. The >= is defensive only.
>
> > I think the code self-explain this already.
> > I'd not prefer this comment neither.
>
> Both comments removed in v3.
Thanks. Can you additionally remove the comments of CH12, which
looks like not preferred AI-like comments? I will note this in v3.
>
> v3 follows with MAX_TX_URBS_PER_CH increased from 32 to 64.
>
> Additional validation at 64 URBs: UDP flood (0% loss across 4M
> datagrams at 930 Mbps), bidirectional (zero retransmits), and
> 60-second soak (844 Mbps sustained, zero degradation).
>
> Full test data:
> https://github.com/Lucid-Duck/tx-resources-flow-control/blob/main/test-resul
> ts/2026-03-23-ping-ke-v2-review.md
Thanks for your experiments in detail. :)
Ping-Ke
prev parent reply other threads:[~2026-03-24 0:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 22:19 [PATCH] wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs Lucid Duck
2026-01-26 3:39 ` Ping-Ke Shih
2026-01-26 10:14 ` Mh_chen
2026-01-27 5:00 ` Lucid Duck
2026-01-26 14:09 ` Bitterblue Smith
2026-01-27 20:01 ` Lucid Duck
[not found] ` <202601291256.60TCusZS3018440@rtits1.realtek.com.tw>
2026-01-29 13:12 ` Mh_chen
2026-03-21 3:37 ` [PATCH v2] " Lucid Duck
2026-03-23 9:31 ` Ping-Ke Shih
2026-03-23 23:33 ` Lucid Duck
2026-03-24 0:38 ` Ping-Ke Shih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=701291fc012b49979b1fb25b8d765d65@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lucid_duck@justthetip.ca \
--cc=rtl8821cerfe2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox