From owner-freebsd-usb@FreeBSD.ORG Tue Sep 17 15:38:19 2013 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 23A54FF0; Tue, 17 Sep 2013 15:38:19 +0000 (UTC) (envelope-from h.schmalzbauer@omnilan.de) Received: from s1.omnilan.de (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 937FC2CE6; Tue, 17 Sep 2013 15:38:17 +0000 (UTC) Received: from titan.inop.wdn.omnilan.net (titan.inop.wdn.omnilan.net [172.21.3.1]) (authenticated bits=0) by s1.omnilan.de (8.13.8/8.13.8) with ESMTP id r8HFc4DF001903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Sep 2013 17:38:05 +0200 (CEST) (envelope-from h.schmalzbauer@omnilan.de) Message-ID: <5238775C.8010000@omnilan.de> Date: Tue, 17 Sep 2013 17:38:04 +0200 From: Harald Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: umcs (4-Port-USB-serial) triggering way too much ehci IRQs References: <52372DBA.6020703@omnilan.de> <875323075.20130917124437@serebryakov.spb.ru> <523816E1.10603@omnilan.de> <1857258551.20130917124737@serebryakov.spb.ru> <5238198C.3070604@bitfrost.no> <52381BAC.5010801@omnilan.de> <52381FCA.5030509@bitfrost.no> In-Reply-To: <52381FCA.5030509@bitfrost.no> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0177A4046D5887A62790A5AB" Cc: lev@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 15:38:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0177A4046D5887A62790A5AB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Bez=C3=BCglich Hans Petter Selasky's Nachricht vom 17.09.2013 11:24 (localtime): > On 09/17/13 11:06, Harald Schmalzbauer wrote: >> ... >> Shall we switch to non-list-comm? > > Hi, > > That's OK. > >> Hmm, in my case, this 4-port-serial-USB-hub will be used as console >> concentrator. So most time it's doing nothing, just feeding tmux with >> consoles output. What latency are we talking about? Less than a some >> milliseconds should be fine. >> What I'm curious about is why my prolific USB-serial converter doesn't= >> generate these high irqs. > > Try this patch and see what happens: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- umcs.c (revision 255492) > +++ umcs.c (local) > @@ -230,6 +230,7 @@ > .bufsize =3D 0, /* use wMaxPacketSize */ > .callback =3D &umcs7840_intr_callback, > .if_index =3D 0, > + .interval =3D 20, /* ms */ > }, > }; > > > BTW: I see that the umcs driver shouldn't do synchronous control > transfers from the USB interrupt transfer callback. This should be > postponed into some worker thread, for example the USB explore thread. > See USB audio driver for an example. > > --HPS I tried your patch and it works as expected: IRQs decreased to ~64/s when idle/disconnected. One interesting thing I never measured before: Console connection with 115k2 via umcs and 'while ( 2>1 ) echo "---..." end' results in 8000 irqs/s :-( But that's also true for the prolific (uplcom). The latter just goes down to 0.0 irqs/s when idle. Doing the same with uart0 results in 1444irqs/s. Is it by design/unavoidable that transfering the same via USB multiplies by factor 5-6? Thanks, -Harry --------------enig0177A4046D5887A62790A5AB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAlI4d1wACgkQLDqVQ9VXb8glJgCfcPxOhLK9InZxEdLKy4QZaJ5Z 9TQAoIXVb/ztKi8MLts0xBQNcU4nmZQk =CjcI -----END PGP SIGNATURE----- --------------enig0177A4046D5887A62790A5AB--