From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: FPS <mista.tapas@gmx.net>, "Michał Pecio" <michal.pecio@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: Misbehaving Alder Lake-N PCH USB 3.2 xHCI Host Controller
Date: Tue, 27 Aug 2024 16:49:29 +0300 [thread overview]
Message-ID: <5f8cb14c-0cfd-4807-a1fe-e35e41d676d6@linux.intel.com> (raw)
In-Reply-To: <4e78b499-c1a5-4ab1-8bb4-26908d2cc75f@gmx.net>
On 27.8.2024 15.18, FPS wrote:
>
>
> On 8/27/24 1:31 PM, Mathias Nyman wrote:
>> Should be harmless, the cycle bit and capital 'C' changes each time the
>> ringbuffer wraps around.
>> This is how TRB consumers/producers keep track of where we are in the ring.
>>
>> segs 1 vs 2 just tells that we have allocated 2 segments for *Intel host
>> event ringbuffer while only one for Renesas.
>
> OK, thanks for that explanation. I uploaded the full Intel controller
> trace here (curl'able link):
>
> https://uni-bielefeld.sciebo.de/s/0O4XIzW529sKYQM/download
>
> And here is the Renesas trace:
>
> https://uni-bielefeld.sciebo.de/s/jB4qqFL0okPlYwN/download
>
> Another difference which I find maybe more interesting then. If you
> scroll down to where the steady state has been reached, e.g. timestamp
> 119173.008004 for the Intel trace and timestamp 564371.959089 for the
> Renesas trace, then there are always 8 xhci_handle_transfer calls for
> TDs of size 48 and 8 queue_trb calls between doorbell rings for the
> Renesas controller, but for the Intel controller it looks different:
> There are also always 8 xhci_queue_trb calls, but either 7 or 9
> xhci_handle_transfer calls. This is quite odd, no?
The 9th event means that xHC hardware managed to handle one more isoc transfer
before the xhci interrupt handler was called and started handling events.
xhci interrupt handler handles all pending events on the event ring, but an
actual interrupt is generated only on last (8th) TD.
xHC completes 1st TD of URB X, writes event on event ring
125us passes
xHC completes 2nd TD of URB X, writes event on event ring
... (same for all TDs 3-7)
xHC completes 8th TD (last in URB X), writes event on event ring, triggers interrupt.
125us passes
xHC completes 1st TD of URB Y, writes event on event ring.
xhci interrupt handler is finally running, processing all 9 pending transfers,
it will give back URB X after processing its last (8th) event, but continue
processing the first TD of URB Y
So there is an at least 125us delay between xHC completing 8th TD, triggering
an interrupt and interrupt handler actually running, finishing processing events.
Thanks
Mathias
next prev parent reply other threads:[~2024-08-27 13:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-18 20:56 Misbehaving Alder Lake-N PCH USB 3.2 xHCI Host Controller FPS
2024-08-19 13:38 ` Mathias Nyman
2024-08-19 20:12 ` FPS
2024-08-20 11:01 ` Michał Pecio
2024-08-20 21:04 ` FPS
2024-08-21 13:02 ` Michał Pecio
2024-08-21 13:46 ` fps
2024-08-21 14:15 ` Mathias Nyman
2024-08-21 16:49 ` Michał Pecio
2024-08-23 11:43 ` FPS
2024-08-24 21:22 ` FPS
2024-08-25 4:58 ` Michał Pecio
2024-08-25 7:46 ` fps
2024-08-25 15:15 ` Michał Pecio
2024-08-25 20:38 ` FPS
2024-08-27 10:30 ` FPS
2024-08-27 11:31 ` Mathias Nyman
2024-08-27 12:18 ` FPS
2024-08-27 13:49 ` Mathias Nyman [this message]
2024-08-27 12:37 ` Mathias Nyman
2024-08-28 9:15 ` FPS
2024-08-27 12:38 ` Mathias Nyman
2024-08-27 20:49 ` FPS
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=5f8cb14c-0cfd-4807-a1fe-e35e41d676d6@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=michal.pecio@gmail.com \
--cc=mista.tapas@gmx.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.