Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 2002 17:29:33 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        myevmenk@exodus.net
Cc:        current@FreeBSD.ORG
Subject:   Re: Interrupt vs. polling on -current
Message-ID:  <20020811.172933.13462313.imp@bsdimp.com>
In-Reply-To: <3D540794.E487F2F4@exodus.net>
References:  <3D540794.E487F2F4@exodus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[[ I've read the rest of this thread ]]

In message: <3D540794.E487F2F4@exodus.net>
            Maksim Yevmenkin <myevmenk@exodus.net> writes:
: My tests are very simple. I plug USB dongle and one PC-CARD
: and try to pump data between them as fast as possible. The
: data blocks sizes are between 63 and 1500 bytes. 

I think that the issue here may be that the USB stack may be
interacting badly with the interrupt system.  Since the pccard is
effectively forced into sharing the interrupt with the USB stack with
NEWCARD, that's going to interact very badly, I think.  Worse even
than if you were multiplexing the xl0 driver and the sio0 driver.

The sio driver is extremely sensitive to the interrupt latency, since
the underlying hardware has only a few characters to react before the
fifo overflows.  At 115200 baud, each character takes 1/11520 seconds
(or 86us), and the fifo is set to have only 8 bytes left when the
device interrupts.  This means that the sio driver can only tolerate
about 700us of latency before there are issues.  With 500 interrupts
per second, that's an interrupt every 2000us, which is about the same
"order" as the maximum latency tolerance.  If these interrupts are
shared and are taking a while to allow the serial driver to run, then
you are almost certain to cause problems.

For cardbus cards, we're forced to use the pci interrupt and share it.
For "r2" cards (aka 16-bit cards), we could use an unused ISA
interrupt on most (but not all) cardbus bridges, but currently there's
no support for that in NEWCARD.

I'm also surprised you were able to make it work at all.  I've had
lots of bad luck when trying to make modems work in recent -current
kernels.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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