USB I/O draining my userspace (Ubuntu Natty 64b)
Matan Ziv-Av
matan at svgalib.org
Wed Jun 15 20:51:13 IDT 2011
On Wed, 15 Jun 2011, geoffrey mendelson wrote:
> No. It has to do with how USB is implemented in hardware. Almost every
> motherboard I have seen only has 2 USB ports. Motherboards with 6 USB ports
> on the back, and connectors for more on the front of the case still have only
> 2 USB ports, but they have a hub built into the motherboard.
>
> For example, on one system I have: lspci yields:
>
> 00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
> Controller (rev 62)
> 00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
> Controller (rev 62)
> 00:10.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 65)
>
> The third USB controller is a PCI card. Now if you do a lsusb:
>
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>
> But I don't have any hubs. They are on the motherboard and the PCI card.
>
> So if you plug the keyboard and mouse into the same port as the memory stick,
> you are doing two things.
This is incorrect. Those hubs you see are virtual root hubs which are
merely a way for the linux kernel presents things. Note that the vendor
is "Linux Foundation". Actually, all your USB ports are connected
directly to the host controller, which has (on a typical PC) 6 or more
ports.
> The first is you are slowing the memory stick down to the speed of the
> keyboard and mouse, usually 12mbits per second.
A USB 2.0 high speed hub may be connected to both low/full speed devices
and high speed devices at the same time, and the high speed devices will
be used at high speed.
> The second is that you are blocking IO to the keyboard and mouse while the
> disk is busy.
That is not how USB works. The data to/from disk is done in bulk
transfer which has lowest priority so it does not block HID data from
keyboard or mouse that uses interrupt transfer. On the other hand the
small amount of data that the mouse and keyboard generate is unlikely to
noticeably reduce the bandwidth available to the disk.
--
Matan.
More information about the Linux-il
mailing list