2.6.11, USB: High latency?
Quoth [email protected]:
Quoted 3 lines
Even when the errors described in my previous mail does not occur, massive USB stick transfers cause latencies of 1 to 2 milliseconds, which is way too much for realtime control systems.
I couldn't find that previous email in the MARC archives.
Regardless, you'd have to provide a small bit of information about your hardware configuration. What device speed: full or high?
What controller: EHCI, OHCI, UHCI, something else? Which driver for the stick: usb-storage, or ub? What else was using memory
and PCI bandwidth at the time? SMP?
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Well, I'd not yet expect USB audio to work over EHCI quite yet, though one of the patches Greg just posted should help some of the issues with full speed iso through USB 2.0 hubs. (At least for OUT transfers as to speakers.)
You might consider reporting such issues on the Linux-USB list. It's been ages since anyone reported such a bug with the OHCI or UHCI drivers ... probably why folk have assumed there are no problems there.
Something to consider specifically with audio. That uses the isochronous transfer mode, reserving USB bandwidth. But I've certainly seen systems with PCI busses that are severely clogged, so that the USB controllers have a hard time accessing main memory. Even a perfectly functional USB stack will have a hard time with such hardware!
- Dave
Quoted 4 lines · David Brownell
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Please don't trim cc: lists. Always use reply-to-all for LKML mail.
Thanks,
Lee
Quoted 7 lines · Lee Revell
Quoted 4 lines · David Brownell
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Please don't trim cc: lists. Always use reply-to-all for LKML mail.
Please don't assume everyone subscribes to LKML, or that everything crafted to be threaded more-or-less-correctly was really crafted with any kind of "reply" command. :)
Quoted 7 lines · David Brownell
Quoted 6 lines · Lee Revell
Quoted 4 lines · David Brownell
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Quoted 5 lines
Quoted 1 line
Please don't trim cc: lists. Always use reply-to-all for LKML mail.
Please don't assume everyone subscribes to LKML, or that everything crafted to be threaded more-or-less-correctly was really crafted with any kind of "reply" command. :)
Um, that's exactly why reply-to-all should be used, because not everyone who posts to LKML subscribes to the list. Otherwise, you'd either have to make everyone who posts a question or a bug report subscribe to the list to see the replies, or place the burden on the responder to keep track of who wants to be cc'ed and who doesn't.
Beaised, even if you disagree with them, when you post to LKML you abide by the LKML rules. It's up to you to know what those are.
Lee
Quoted 6 lines
Quoted 4 lines
Please don't assume everyone subscribes to LKML, or that everything crafted to be threaded more-or-less-correctly was really crafted with any kind of "reply" command. :)
Um, that's exactly why reply-to-all should be used,
There you go, assuming that there was a message to which a "reply-to-all" would apply. MARC, like many archives, doesn't provide such a CC list.
[cc list restored]
Quoted 10 lines · David Brownell
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Well, I'd not yet expect USB audio to work over EHCI quite yet, though one of the patches Greg just posted should help some of the issues with full speed iso through USB 2.0 hubs. (At least for OUT transfers as to speakers.)
This is the exact configuration of one of the users who reported the problem on LAU. Got a pointer to the patch? And what's the issue with IN transfers?
Quoted 5 lines
You might consider reporting such issues on the Linux-USB list. It's been ages since anyone reported such a bug with the OHCI or UHCI drivers ... probably why folk have assumed there are no problems there.
OK, good to know.
Quoted 7 lines
Something to consider specifically with audio. That uses the isochronous transfer mode, reserving USB bandwidth. But I've certainly seen systems with PCI busses that are severely clogged, so that the USB controllers have a hard time accessing main memory. Even a perfectly functional USB stack will have a hard time with such hardware!
Unlikely because it works under Windows. We're not all that far behind however; USB audio on that OS did not really work until XP SP1. Also, if that were a widespread problem we would be seeing problems with PCI devices too.
Also please fix the threading in your email client.
Lee
Quoted 1 line · Lee Revell
[cc list restored]
Thanks, I never had one to start with ... :)
Quoted 12 lines · David Brownell
Quoted 10 lines
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Well, I'd not yet expect USB audio to work over EHCI quite yet, though one of the patches Greg just posted should help some of the issues with full speed iso through USB 2.0 hubs. (At least for OUT transfers as to speakers.)
Quoted 3 lines
This is the exact configuration of one of the users who reported the problem on LAU. Got a pointer to the patch? And what's the issue with IN transfers?
This is what Greg just posted (and Linus merged into BK, so it'll be in BK snapshots starting tomorrow):
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=111221966815043&w=2
The issue with IN transfers is that microframe scheduling is ... tricky. One must track all kinds of stuff (which TTs are involved, which microframes are busy, how busy they are, how much non-TT bandwidth is available). And the relevant EHCI data structures are almost as irregular as the USB trees one must cope with.
Plus one must have the time to spend debugging and fixing the problems, stress testing the fixes, and devices that will trigger the problems. I've had none of those, for quite some time now. (My particular USB speakers have pretty much always worked on Linux, even through a USB 2.0 hub.)
Karsten has some not-ready-for-prime-time patches which he's posted recently. They basically hardwire some of the scheduling outputs well enough to get some of his IN transfers to work. Maybe he'll be nice enough to repost them against current BK (they include the patch above).
I'd like to see all that split ISO stuff working with EHCI, but someone else is going to have to do most of the work. Once it's working we can take the CONFIG_EXPERIMENTAL off, which will remove another source of errors. :)
- Dave
Quoted 6 lines · David Brownell
Quoted 1 line · Lee Revell
[cc list restored]
Thanks, I never had one to start with ... :)
Thank you. Sorry for the tone of my reply...
Quoted 32 lines
Quoted 12 lines · David Brownell
Quoted 10 lines
Quoth [email protected]:
Quoted 3 lines
I think this is connected to a problem people have been reporting on the Linux audio lists. With some USB chipsets, USB audio interfaces just don't work. There are dropouts even at very high latencies.
Well, I'd not yet expect USB audio to work over EHCI quite yet, though one of the patches Greg just posted should help some of the issues with full speed iso through USB 2.0 hubs. (At least for OUT transfers as to speakers.)
Quoted 3 lines
This is the exact configuration of one of the users who reported the problem on LAU. Got a pointer to the patch? And what's the issue with IN transfers?
This is what Greg just posted (and Linus merged into BK, so it'll be in BK snapshots starting tomorrow):
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=111221966815043&w=2
The issue with IN transfers is that microframe scheduling is ... tricky. One must track all kinds of stuff (which TTs are involved, which microframes are busy, how busy they are, how much non-TT bandwidth is available). And the relevant EHCI data structures are almost as irregular as the USB trees one must cope with.
Plus one must have the time to spend debugging and fixing the problems, stress testing the fixes, and devices that will trigger the problems. I've had none of those, for quite some time now. (My particular USB speakers have pretty much always worked on Linux, even through a USB 2.0 hub.)
Quoted 5 lines
Karsten has some not-ready-for-prime-time patches which he's posted recently. They basically hardwire some of the scheduling outputs well enough to get some of his IN transfers to work. Maybe he'll be nice enough to repost them against current BK (they include the patch above).
Thanks for the explanation. I found this patch, and sent the link to the LAU posters with the problem.
There are apparently many users affected (some gave up and went back to 2.4), so there's good opportunity for testing.
Quoted 4 lines
I'd like to see all that split ISO stuff working with EHCI, but someone else is going to have to do most of the work. Once it's working we can take the
CONFIG_EXPERIMENTALoff, which will remove another source of errors. :)
Thanks again for your help, I'll report any interesting results.
Lee
Quoted 12 lines · Lee Revell
Quoted 11 lines · David Brownell
Quoted 4 lines · Lee Revell
This is the exact configuration of one of the users who reported the problem on LAU. Got a pointer to the patch? And what's the issue with IN transfers?
This is what Greg just posted (and Linus merged into BK, so it'll be in BK snapshots starting tomorrow):
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=111221966815043&w=2
Quoted 8 lines
Quoted 2 lines
The issue with IN transfers is that microframe scheduling is ... tricky.
...Thanks for the explanation. I found this patch, and sent the link to the LAU posters with the problem.
There are apparently many users affected (some gave up and went back to 2.4), so there's good opportunity for testing.
Yes. That's why I was particularly glad to see the patches from Karsten; they were the first ones that actually got "it works for me now!!" reports.
With luck, all full speed ISO-OUT transfers will now work through EHCI. Even through the funky multi-TT hubs from Cypress. My main question is whether this is also true of the TDI (nee ARC) EHCI silicon that's being embedded in various non-PCI chips.
This all seems off-topic for latency though. :)
- Dave
Quoted 10 lines
Quoted 4 lines
I'd like to see all that split ISO stuff working with EHCI, but someone else is going to have to do most of the work. Once it's working we can take the
CONFIG_EXPERIMENTALoff, which will remove another source of errors. :)Thanks again for your help, I'll report any interesting results.
Lee
Quoted 2 lines · David Brownell
This all seems off-topic for latency though. :)
Disagree, in the bug reports I saw from JACK users the symptoms are exactly the same as a kernel latency problem. The only clear hint that it's something else is that the RT kernel and mainline are equally affected.
Lee
Quoted 4 lines · David Brownell
This is what Greg just posted (and Linus merged into BK, so it'll be in BK snapshots starting tomorrow):
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=111221966815043&w=2
Wow, just checked my mail and there were at least 5 threads just from the past few weeks about this problem on various Linux audio lists. I guess we'll see real soon if it helps.
Lee