Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhci: Use more event ring segment table entries #3147

Merged
merged 1 commit into from Aug 13, 2019

Conversation

@P33M
Copy link
Contributor

commented Aug 13, 2019

Users have reported log spam created by "Event Ring Full" xHC event
TRBs. These are caused by interrupt latency in conjunction with a very
busy set of devices on the bus. The errors are benign, but throughput
will suffer as the xHC will pause processing of transfers until the
event ring is drained by the kernel. Expand the number of event TRB slots
available by increasing the number of event ring segments in the ERST.

Controllers have a hardware-defined limit as to the number of ERST
entries they can process, so make the actual number in use
min(ERST_MAX_SEGS, hw_max).

Signed-off-by: Jonathan Bell jonathan@raspberrypi.org

val |= ERST_NUM_SEGS;
val2 = readl(&xhci->ir_set->erst_size);
val2 &= ERST_SIZE_MASK;
val2 |= val;
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"// Write ERST size = %i to ir_set 0 (some bits preserved)",
val);

This comment has been minimized.

Copy link
@pelwell

pelwell Aug 13, 2019

Contributor

The swapping of val and val2 (just to use them in order?) is a bit gratuitous, and it breaks/non-obviously-fixes this debug output.

This comment has been minimized.

Copy link
@P33M

P33M Aug 13, 2019

Author Contributor

Bits 31:16 are RsvdP (reserved, preserve anyway) but this now truncates the register if any of the reserved bits are used. Debug should use val2 - will fix

This comment has been minimized.

Copy link
@pelwell

pelwell Aug 13, 2019

Contributor

And swap val and val2? Plz?

This comment has been minimized.

Copy link
@P33M

P33M Aug 13, 2019

Author Contributor

k

This comment has been minimized.

Copy link
@pelwell

pelwell Aug 13, 2019

Contributor

Thx

@P33M P33M force-pushed the P33M:xhci-event-rings branch from 480d87b to d8693fc Aug 13, 2019

xhci: Use more event ring segment table entries
Users have reported log spam created by "Event Ring Full" xHC event
TRBs. These are caused by interrupt latency in conjunction with a very
busy set of devices on the bus. The errors are benign, but throughput
will suffer as the xHC will pause processing of transfers until the
event ring is drained by the kernel. Expand the number of event TRB slots
available by increasing the number of event ring segments in the ERST.

Controllers have a hardware-defined limit as to the number of ERST
entries they can process, so make the actual number in use
min(ERST_MAX_SEGS, hw_max).

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>

@P33M P33M force-pushed the P33M:xhci-event-rings branch from d8693fc to c9be4ee Aug 13, 2019

@pelwell pelwell merged commit 5f945aa into raspberrypi:rpi-4.19.y Aug 13, 2019

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Aug 16, 2019
kernel: Bump to 4.19.66
kernel: configs: Enable building the DS28E17 driver module
See: raspberrypi/linux#3141

kernel: ARM: dts: bcm2711-rpi-4-b: I2C aliases and pulls
See: https://www.raspberrypi.org/forums/posting.php?mode=reply&f=107&t=248439

kernel: xhci: Use more event ring segment table entries
See: raspberrypi/linux#3147

kernel: dwc_otg: use align_buf for small IN control transfers
See: raspberrypi/linux#3150
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Aug 16, 2019
kernel: Bump to 4.19.66
kernel: configs: Enable building the DS28E17 driver module
See: raspberrypi/linux#3141

kernel: ARM: dts: bcm2711-rpi-4-b: I2C aliases and pulls
See: https://www.raspberrypi.org/forums/posting.php?mode=reply&f=107&t=248439

kernel: xhci: Use more event ring segment table entries
See: raspberrypi/linux#3147

kernel: dwc_otg: use align_buf for small IN control transfers
See: raspberrypi/linux#3150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.