Skip to content

Mass-storage performance enhancements - #7578

Open
P33M wants to merge 2 commits into
raspberrypi:rpi-6.18.yfrom
P33M:ums_perf_enh
Open

Mass-storage performance enhancements#7578
P33M wants to merge 2 commits into
raspberrypi:rpi-6.18.yfrom
P33M:ums_perf_enh

Conversation

@P33M

@P33M P33M commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

See #7545 (comment) for rationale.

Increasing nominated USB2 devices' max_sectors limit (e.g. linux UMS gadgets) should be handled by udev rulesets.

P33M added 2 commits August 27, 2026 11:43
This quirk has a negative impact on most USB mass-storage devices.

The description of the feature in the databook is conflated with a case
where parkmode performs badly with specific devices, but doesn't assign
importance to this statement:

"When park mode is disabled, pipelining of multiple packets is disabled
and instead one packet at a time is requested by the scheduler."

Removing the pipelining causes inter-transaction latency of the order of
4us when a single HS bulk endpoint is being serviced. This drops USB
mass-storage sequential performance by 20%.

RP1 has separate bus instances for each USB2 port, so the multi-device
case that theoretically suffers is even less likely to occur.

In raspberrypi#5892
this feature was disabled at the recommendation of Synopsys, not
through a requirement to fix an interop bug with a device in the field.
So turn "park mode" back on for HS.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Apply the higher USB3 limit to USB3 devices connected to USB2 ports,
detectable through the existence of a SuperSpeed companion descriptor.

For 16K page platforms, use 192 in preference to 240 as this breaks
transfers on a 64-sector boundary instead of 32. Middle-of-the-range
devices show a modest sequential speed increase with 64s alignment.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.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