On Fri, Jul 27, 2012 at 7:10 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Fri, 27 Jul 2012, Alexey Filin wrote: > >> So USB is not a "classic" bus and not universal, it is a network with >> non-constant delay. >> >> Are there USB controllers with the "synchronous transfers" reported >> not on microframe boundary, so we can get response less 125 us? >> Is there any USB2.0 spec extension declaring "synchronous transfers"? >> >> USB is a good choice for some bus adapters, it is used widely, cheap, >> simple. For 2-byte read/write we could use either two bulk IN/OUT >> endpoints (131 * 8kHz ~ 1 MHz) or one control endpoint (table 5-3, 42 >> * 8 kHz = 336 kHz). Ethernet is overkill for the task even if it could >> provide 1 us delay. > > Gigabit ethernet can transfer around 1000 bits every microsecond. In > theory that's enough to handle two 2-byte transfers. But I don't know > what the latency is; probably it depends on the hardware and the > driver. It seems RDMA doesn't use TCP/IP stack and requires hw support for low latency. > >> Is it possible for USB Implementers Forum to add extension for >> "synchronous transfers" to be handled asynchronously with microframe >> boundaries? >> Existing bus adapters use frequently closed proprietary protocols for >> pc-adapter link, e.g. CAEN CONET for PCI(e)-VME (I talk about remote >> adapters to access with a link, not bridges)... > > Peter's response was right on the money. USB wasn't designed to do > what you want and it wasn't intended to be used that way. You should > look into a different technology. I don't know offhand what schemes > offer latencies under 1 us, however. e.g. memory-mapped IO, Linux provides it already. I see 2-3 us delay for 2-byte transfers over PCI-VME-Qbus adapters. I see 5-6 us delay over custom-made PCI-Qbus adapter with IO ports. > With a general-purpose OS like > Linux, even with the realtime modifications, you'll find it very > difficult to achieve such a low latency. I don't need hard 1 us real-time delay, I need average 1 us delay for 2-byte IO > > Alan Stern > I got good answers, thanks Alexey. -- 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