From owner-freebsd-hackers Fri Mar 7 06:51:13 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA17411 for hackers-outgoing; Fri, 7 Mar 1997 06:51:13 -0800 (PST) Received: from bmcgover-pc.cisco.com (bmcgover-pc.cisco.com [171.69.104.147]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA17405 for ; Fri, 7 Mar 1997 06:51:08 -0800 (PST) Received: from bmcgover-pc.cisco.com (localhost.cisco.com [127.0.0.1]) by bmcgover-pc.cisco.com (8.8.5/8.8.2) with ESMTP id JAA01692 for ; Fri, 7 Mar 1997 09:50:37 -0500 (EST) Message-Id: <199703071450.JAA01692@bmcgover-pc.cisco.com> To: hackers@freebsd.org Subject: Performance questions (Interrupt vs. polled) Date: Fri, 07 Mar 1997 09:50:36 -0500 From: Brian McGovern Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I have a 460K/s 8 port serial card that I'm working on a driver for. Its a PCI card. I have the option of polling it, or setting up an interrupt handler for it. According to the docs, I'll have ~ 40-85ms available for interrupt latency. There will be somewhere between 2-8Kb buffers available for each port by the time I'm done (which can raise the latency levels by another 50% if I go to 8Kb, as the numbers above are for a 2-4Kb buffer). I guess the question is, which would "be better" in terms of performance in this case? I've heard arguements that on boards that perform like this, that Polled I/O works best, due to the high overhead of setting up for the interrupt. Then again, given sufficient buffer space, I've heard that using an interrupt is better due to the high overhead of scheduling the polling. I'm hoping not to start a flame war, but rather would just like to know the pros and cons, so I can make a decision as to how to work this driver for maximum overall system efficiency. -Brian