From: Alan Stern <stern@rowland.harvard.edu>
To: Thilo Roerig <thilo.roerig@googlemail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: Receiving report multiple times when changing cpu
Date: Fri, 14 Oct 2022 09:32:40 -0400 [thread overview]
Message-ID: <Y0lk+IiDmrkmAfRk@rowland.harvard.edu> (raw)
In-Reply-To: <20221014112049.2456-1-roerig@interactive-scape.com>
On Fri, Oct 14, 2022 at 01:20:49PM +0200, Thilo Roerig wrote:
> > As Greg mentioned, usbmon is a better way to snoop the data transfers.
>
> I have continued to investigate the issue using usbmon, but unfortunately, I
> could not find any other irregularity, but the jumps in the report id pattern.
Did you check the timestamps carefully? In particular, did you
examine the times when each transfer was submitted and completed? If
two adjacent transfers complete more than one or two microseconds
apart, that indicates a problem.
Also, do the report IDs show up in the usbmon trace so that you can
directly see which ID appears in which transfer?
> > The most important thing you should do, to ensure that reports do not
> > get lost, is submit a large queue of interrupt transfers in advance.
> > Each time a transfer completes, add another submission to the queue.
> >
> > That way, even if your process loses control of the CPU for some period
> > of time, the transfers will continue (unless the period is so long that
> > your entire queue gets consumed before the process is able to submit
> > more requests).
>
> Thank you for your help! Initially, I was submitting 4 transfers only.
> I'll try to submit more transfers once I start loosing reports. Currently
> I am able to get all reports using only 4 transfers. I'm loosing reports
> only if I'm debugging with `usbfs_snoop`. In this case, I tried submitting
> more transfers, but I was still loosing some reports, so I decided, that
> I will try to find another debugging possibility iother then usbfs_snoop.
Yeah, probably usbfs_snoop slows everything down so much that it
becomes impossible for your program to keep up with device.
On the other hand, if you're able to get all the reports (without
usbfs_snoop) using only four transfers then it seems like you've
solved the problem!
Alan Stern
next prev parent reply other threads:[~2022-10-14 13:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 14:35 Receiving report multiple times when changing cpu Thilo Rörig
2022-10-12 16:00 ` Greg KH
2022-10-14 11:18 ` Thilo Roerig
2022-10-14 13:52 ` Greg KH
2023-02-22 8:27 ` Thilo Roerig
2022-10-12 16:54 ` Alan Stern
2022-10-14 11:20 ` Thilo Roerig
2022-10-14 13:32 ` Alan Stern [this message]
2023-02-22 8:24 ` Thilo Roerig
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=Y0lk+IiDmrkmAfRk@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=linux-usb@vger.kernel.org \
--cc=thilo.roerig@googlemail.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