RE: EHCI Isochronous schedule full?

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

 



On Thu, 4 Sep 2014, Christian Melki wrote:

> Hi Alan.
> 
> The machine has only two cameras inserted (no hids, nothing else).
> While the cameras have an interrupt endpoint, I disabled it in
> uvc_video. Still I don't get more than two cameras into the schedule.
> So there are no interrupt endpoints besides the one used for the
> internal hubs. They are 2 and their schedule is 4bytes per 256ms.
> Hardly a large load.

The total load isn't what matters; it's more a question of what slots
in the schedule get used up.  The periodic scheduler in ehci-hcd isn't
capable of moving things around if the schedule is fragmented and a
large contiguous reservation is needed.

> With the interrupt endpoints on the camera, usage was 98%, now it's
> 93% with them disabled.

With two cameras you get 93% usage?  And you wonder why you can't get 
three cameras to fit in the schedule?

> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
> B:  Alloc=744/800 us (93%), #Int=  2, #Iso= 10
> 
> The only reason I can come up with to make this happen is that the
> driver does not send 3 packets per microframe worth of isoc-data or
> that the scheduler does not account for that capacity, ie only 8
> microframes * 1024 bytes. Something along that path. Or the scheduler
> is really, really broken. :)

The scheduler isn't really broken, but it definitely is not as capable 
as it ought to be.

> That would probably give me 80%+ usage when it should not be more
> than 30-35%.
> 
> Searching the net for it yields approx. the same information. People
> are lucky to be able to run two cameras with Linux.

I can't tell what's going on without a lot more detailed information.  
To start with, I'd need the contents of /sys/kernel/debug/usb/devices
for all devices on the bus (not just one or two lines) -- that's while
the cameras are both running.  And it wouldn't hurt to have the dmesg
log for the period when you start using the cameras, with debugging
enabled for ehci-hcd.

Also, recent kernels (try for 3.16) have more detailed scheduling info
in ehci-hcd's debugfs directories.  There's a new file named
"bandwidth" that would be highly relevant.

Alan Stern

--
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