Re: High CPU load produced by USB (DW2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 Mar 2018 12:06:55 +0000, Minas Harutyunyan <Minas.Harutyunyan@xxxxxxxxxxxx> wrote:

> Hi Paul,
> 
> Nice to hear you  again! Hope you are doing well.

Thanks, same to you.

> On 3/8/2018 1:51 PM, Paul Zimmerman wrote:
> > On 03/06/2018 09:09 AM, Minas Harutyunyan wrote:
> >> Driver debug log not required.
> >> Based on lsusb output: to dwc2 port connected "Standard Microsystems
> >> Corp. USB 2.0 Hub" to which connected your HS device "SanDisk Corp.
> >> Ultra". Because of connected HUB, which have periodic endpoint
> >> (Interrupt IN EP1) like all HUB's, dwc2 forced in Buffer DMA mode unmask
> >> SOF interrupts.
> > 
> > Hmm. It seems to me that for hubs, where the interrupt EP is only used to
> > poll for connection changes (so the accuracy of the polling interval is not
> > important), an OS timer could be used instead of enabling SOF interrupts.
> > 
> > I have a Raspberry Pi 3 around here somewhere, maybe I'll dig it out and
> > try playing around with this idea. No promises though!
> > 
> 
> As I correctly understand, you suggest to mask SOF's and schedule in 
> dwc2 timer with expiration time 125us*interval. Based on timer 
> expiration get first urb from periodic queue and start transfer on 
> Interrupt IN EPn. In this case interrupt count will be decreased by 
> 'interval' times. But how you going to recognized inside dwc2 that this 
> Interrupt IN EPn is HUB endpoint or not?

Yes, you understand correctly. But on second thought, we would need to treat
*all* interrupt EPs this way, since things like mice and keyboards also have
interrupt EPs. But I'm not sure if any device really needs highly accurate
polling intervals on their interrupt EPs, so my idea may still work.

In any case, I have my RPI3 set up and I can build a working kernel for it
(sort of, but that's another story), so I will start experimenting with this.

-- 
Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux