Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Sep 2013 19:32:56 +0200
From:      Harald Schmalzbauer <h.schmalzbauer@omnilan.de>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        lev@FreeBSD.org, FreeBSD Stable <freebsd-stable@FreeBSD.org>, freebsd-usb@FreeBSD.org, Hans Petter Selasky <hans.petter.selasky@bitfrost.no>
Subject:   Re: umcs (4-Port-USB-serial) triggering way too much ehci IRQs
Message-ID:  <52389248.7080109@omnilan.de>
In-Reply-To: <1379434567.1197.48.camel@revolution.hippie.lan>
References:  <52372DBA.6020703@omnilan.de>	 <zarafa.5237e529.2bc6.08fde6eb34c27a87@mail.lockless.no>	 <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> <5238775C.8010000@omnilan.de> <1379434567.1197.48.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig38A906B84D5930E472AEDBEC
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

 Bez=FCglich Ian Lepore's Nachricht vom 17.09.2013 18:16 (localtime):
> On Tue, 2013-09-17 at 17:38 +0200, Harald Schmalzbauer wrote:
>> ...
>>> 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=
=2E
>>> 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 multipli=
es
>> by factor 5-6?
>>
>> Thanks,
>>
>> -Harry
>>
> I don't know about that chipset, but with the FTDI chips it does xfers
> in 64 byte chunks and high speed bulk data results in an astronomical
> number of interrupts (and if you go fast enough, lost data).  I have

According to ASIX product brief, MCS7840 has 512 byte buffer. Pretty
much for an UART I think, which should make 115k2 baud connections  with
less than 30 transfers/s work, or am I missing something?


> some patches that assemble lots of the little chip-size buffers into
> bigger xfers that the ohci/ehci controller can handle without
> interrupting the processor; that helps the problem a bunch.

I think I also have at least one FTDI adapter arround, so I'd happily
testing if I can make it compile on RELENG_9_2.

Thanks,

-Harry




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

iEYEARECAAYFAlI4kkgACgkQLDqVQ9VXb8iibACgiAipzBpCR/Q7LgKUwfIav0As
5lAAoJ7gNVddRt7cyVnBa9FKorIzz4xB
=q662
-----END PGP SIGNATURE-----

--------------enig38A906B84D5930E472AEDBEC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52389248.7080109>