From owner-freebsd-current Sun Aug 11 16:29:43 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8ED837B400 for ; Sun, 11 Aug 2002 16:29:40 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFC0543E70 for ; Sun, 11 Aug 2002 16:29:39 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.5/8.12.3) with ESMTP id g7BNTa9R005733; Sun, 11 Aug 2002 17:29:36 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 11 Aug 2002 17:29:33 -0600 (MDT) Message-Id: <20020811.172933.13462313.imp@bsdimp.com> To: myevmenk@exodus.net Cc: current@FreeBSD.ORG Subject: Re: Interrupt vs. polling on -current From: "M. Warner Losh" In-Reply-To: <3D540794.E487F2F4@exodus.net> References: <3D540794.E487F2F4@exodus.net> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [[ I've read the rest of this thread ]] In message: <3D540794.E487F2F4@exodus.net> Maksim Yevmenkin 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