On 15.8.2023 15.40, Lukas Wunner wrote:
From: Jonathan Bell <jonathan@xxxxxxxxxxxxxxx> 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. Commit dc0ffbea5729 ("usb: host: xhci: update event ring dequeue pointer on purpose") mitigated the issue by advancing the Event Ring Dequeue Pointer already after half a segment has been processed. Nevertheless, providing a larger Event Ring would be useful to cope with load peaks. 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, but with up to 32k it can be excessively high (sec 5.3.4). So cap the actual number at 8 (configurable through the ERST_MAX_SEGS macro), which seems like a reasonable quantity.
Making the new event ring default size 8 times bigger seems a bit over the top, especially when most systems worked fine with just one segment. How about doubling the current size as a default, and then think about adding more segments dynamically if we get "Event Ring Full" events? Thanks Mathias